How to Print Hello Message in Java

  • on February 4, 2019
  • Likes!
Hello Friends! Welcome to Programming Shortcut

In this session, we discuss basic concept of Java programming and what is the basic structure of Java programming.
Java Program to print simple hello message and hello message with Name, input given by using java language. You can use this program both error(compiler and runtime error) free programs just copy and paste the programs and save your time.
Programming Shortcut is helping you in your programming and you make program faster than other

How to Print simple Hello Message in Java Language?

—————– Code Start ———————–

public class hello {
 public static void main(String Args[]) {
        System.out.println(“Hello Word!”);
    }
}

——————Code End——————-

Output: Hello Word!

How to Print simple programmer name with Hello message in Java Language?

 —————– Code Start ———————–

public class hello {

 public static void main(String Args[]) {
        System.out.println(“Hello Ravi Vishwakarma”);
    }

}
——————Code End——————-

Output: Hello Ravi Vishwakarma

How to print username and hello message in Java language?

—————– Code Start ———————–
import java.util.*;
public class Name_by_user {
    public static void main(String args[]) {
        String name;
        Scanner c = new Scanner(System.in);
        System.out.println(“Please Enter Your name: “);
        name = c.nextLine();
        System.out.println(“Welcome to my Website ” + name);
    }
}
——————Code End——————-

Output:  Please Enter Your Name: Ravi Vishwakarma
             Welcome to my Website Ravi Vishwakarma

I make this programming and hope you are like the post if are you like the post you can please comment and Share the post to reach more people.
If any dought about this java programming code or input & output please comment below
If you have other question about java programming send an email by contacting us form are given on page right side.
Thank You!

Article Categories:
Programs in java

Leave a Reply

Your email address will not be published. Required fields are marked *