Write a program to print a simple message in java


Asked by admin @ in Computer Science viewed by 351 People


Write a program to print a simple message in java​

Answered by admin @



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();

}

}


Similar Questions

Write a c++ program to accept and print your name

Asked by admin @ in Computer Science viewed by 333 persons

Write a C++ program to accept and print your name?​

Write a program to split number into digits in java

Asked by admin @ in Computers and Technology viewed by 339 persons

Write a Java program that asks the user to enter a 10-digit string as a typical U.S. telephone number, extracts the 3-digit area code, the 3-digit "exchange," and the remaining …

Write a program to calculate area of circle in c++

Asked by admin @ in Computers and Technology viewed by 316 persons

I want to write a C++ program to read the diameter of a circle. The program should find and display the area and circumference of the circle. Define a constant …

To write the correct and effective program we much first

Asked by admin @ in Computer Science viewed by 1029 persons

To write the correct and effective program we must first

The program to print the sum of all cubes

Asked by admin @ in Computer Science viewed by 1965 persons

Choose the correct option. The program to print the sum of all cubes that lie between 0 and 100 isgiven below. Does this program have an error? If yes, …

Which extension is used to save the java program

Asked by admin @ in Computer Science viewed by 293 persons

Which extension is used to save the Java program?????​

To write the correct and effective program we must first

Asked by admin @ in Computer Science viewed by 786 persons

To write the correct and effective program be much first

Python program to print first n numbers divisible by 5

Asked by admin @ in Computer Science viewed by 357 persons

Write a Python program using while loop first N numbers divisible by 5.

C program to print number in words using switch case

Asked by admin @ in Computer Science viewed by 366 persons

C program to display the number in words using switch case where a sample input and output is given

Pictures for writing simple sentences

Asked by maham237 @ in World Languages viewed by 401 persons

Write two or three simple sentences describing the picture above.

Write a c++ program to calculate gpa in a semester

Asked by admin @ in Computers and Technology viewed by 355 persons

Write a C++ program that opens and reads file question2.txt. File question1.txt has 3 students and 3 grades of each. You program should read values from file and assign values …

Write a php program to read the employee details

Asked by admin @ in Computer Science viewed by 324 persons

Write a php program to read the employee details

Smallest individual unit in java program is known as

Asked by admin @ in Computer Science viewed by 296 persons

The smallest individual unit of a program is

Write a program to calculate compound interest in python

Asked by admin @ in Physics viewed by 423 persons

Write a program in python to calculate the compound interest​

Write a program to find average of three numbers

Asked by admin @ in Computer Science viewed by 340 persons

Write a program to find average of three numbers.

Most viewed questions in Computer Science


A programmer mistakenly writes gor instead of for

Asked by admin @ in Computer Science viewed by 19024 persons


Domestic data entry operator ncert book class 9 solutions

Asked by admin @ in Computer Science viewed by 15811 persons


Information technology code 402 class 9 solutions chapter 1

Asked by admin @ in Computer Science viewed by 10973 persons



Ncert solutions for class 8 computer chapter 1 computer system

Asked by admin @ in Computer Science viewed by 10403 persons


A scrum team works on a 4 weeks sprint

Asked by admin @ in Computer Science viewed by 8722 persons


Which of the following occupies more memory in c

Asked by admin @ in Computer Science viewed by 8137 persons



A database of motor vehicles has the base entity

Asked by admin @ in Computer Science viewed by 7842 persons


The network architecture can be termed as a mcq

Asked by admin @ in Computer Science viewed by 6489 persons


Cat5 and cat6 cabling refer to which reference model layer

Asked by admin @ in Computer Science viewed by 5790 persons



Class 7 computer chapter 3 questions and answers

Asked by admin @ in Computer Science viewed by 5693 persons


Choose the correct options about usability and user experience

Asked by admin @ in Computer Science viewed by 5476 persons


Which advocates daily team meetings for coordination and integration

Asked by admin @ in Computer Science viewed by 4981 persons



Which three security features match the database security level

Asked by admin @ in Computer Science viewed by 4972 persons


Which of the dbms package is not available

Asked by admin @ in Computer Science viewed by 4684 persons


________ aid a business grow and attain its objectives

Asked by admin @ in Computer Science viewed by 4488 persons