Computer Science, asked by tanmay8454, 10 months ago

write a program to print a simple message in java​

Answers

Answered by 20diptajit06
4

HEY MATE HERE IS YOUR ANSWER

HOPE IT HELPS YOU

Answer:

//Creating method in same class (public class) in which main method exists.

import java.util.*;

class HelloWorld

{

public void dispMessage()

{

System.out.println("Hello World.");

}

//Main method

public static void main(String s[])

{

//creat object of HelloWorld Class

HelloWorld obj=new HelloWorld();

obj.dispMessage();

}

}

Answered by kaushikmuk09
4

Answer:

hope it helps and please mark me brainliest and follow

Attachments:
Similar questions