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