Computer Science, asked by Mahikushwaha, 6 months ago

Write a Java program to print “ HAPPY DIWALI".​

Answers

Answered by abhay03ac
3

Answer:

class Diwali

{

public void main(String args)

{

System.out.println("Happy Diwali!");

}

}

Explanation:

Answered by adventureisland
3

Using System.out.print statement for print HAPPY DIWALI.

JAVA program to print “ HAPPY DIWALI" :

  • First of all, import a java package for access to the print Statement.
  • Define a class name for that program and give the Main function (public static void main(String args[]) ).
  • Write a Print statement like System.out.println("HAPPY DIWALI");

Program :

import java.io.*;

public class Sample

{

public static void main(String args[])

{

System.out.println("HAPPY DIWALI");

}

}​

Similar questions