Print your name in Java | Java Programs

Java is a general purpose computer programming language based on classes and objects. It is fast, flexible, secure as well as easy to learn.

In this post we will see how you can print your name in Java.

If you are reading this post, I assume that you might be a beginner in the world of Java and YES I know you want to learn it.

Note: If you want to read about "What is Java?", Click this link...

This is the very basic example of Java. In this post, we are going to learn about how can we print our name in Java. So, Mr.beginner don't focus on other words only focus on the line below:
System.out.println(" Your Name Goes Here...");

As we are at our initial stage of Java, we will not focus on other keyword only focusing on the line i.e "System.out.println("Hello world")". Use this line and write anything inside quotation marks to print as it is.

The image below shows the syntax of the program along with its desired output.  




Below is the source code of: Print your name in Java

public class MyName {

        public static void main(String []args) {
                System.out.println("Hey there,");
                System.out.println("Alee Ahmed Kolachi");
        }

}

Want to practice your own code? Try this compiler and compile Java code online!

Click Here For Java Online Compiler
Share This :

Related Post

avatar

The Java Programming Language A Detail Introduction in Bullet Points

delete 17 August 2018 at 15:13
avatar

JT Casino - Las Vegas, NV - JT Promo Code - JCMH
JT Casino Las Vegas 하남 출장마사지 is a luxurious hotel and 광명 출장샵 casino located on 동해 출장마사지 the Las Vegas 포천 출장안마 Strip. It features all-suite 태백 출장안마 rooms, 24/7 casino gaming,

delete 4 March 2022 at 08:49



sentiment_satisfied Emoticon