Skip to main content

Creating first program in java

It is very simple to write your first java code. Are you worried about how to do this ?. In this topic we are discussing about the basic syntax or terms used to write simple java program. You simply just follow the steps one by one as we did in our example. Don't worry if you don't understand the term used in it, Later we discuss each term on one by one.



Steps to write program


 

  • Open any text editor like Notepad,Notepad++,TextEdit etc.
  • Write the code as shown below. [ You can copy or paste it in your editor ].
  • After writing this code save it, with the name as " learningbyte.java "
  • After saving the code go to that directory wherever you saved your java file in your computer.
    [ Your file location may be different from our example, so follow your directory].
  •  

  • Note:-To run this code , open cmd prompt and type as written below !

    1) File name (cmd): javac learningbyte.java 

    2) Class name (cmd): java demo


    Comments

    Popular posts from this blog

    Conversions of LocalDate , LocalTime and LocalDateTime.

    Getting values from joda Date & Time API in java 8

    Java Development Kit Released

    List of versions of java development kit (JDK). Basically java has various JDK versions as mention in below table. Java SE Version Version Number Release Date Java SE Version Version Number Release Date JDK 1.0 (Oak) 1.0 January 1996 JDK 1.1 1.1 February 1997 J2SE 1.2 (Playground) 1.2 December 1998 J2SE 1.3 (Kestrel) 1.3 May 2000 J2SE 1.4 (Merlin) 1.4 February 2002 J2SE 5.0 (Tiger) 1.5 September 2004 Java SE 6 (Mustang) 1.6 December 2006 Java SE 7 (Dolphin) 1.7 July 2011 Java SE 8 1.8 March 2014 Java SE 9 9 September, 21st 2017 Java SE 10 10 March, 20th 2018 Java SE 11 11 September, 25th 2018 Java SE 12 12 March, 19th 2019 Java SE 13 13 September, 17th 2019