Friday, February 25, 2022

Making a simple Statement in Java

To print "Hello, world!!!" in Java, 
(1) - create project - type java, (2) - name the project the name is Clinic, (3) - open the folder Clinic, (4) - with the right-mouse-button, click in the src, select >new>Java Class>name it I choice Ding, to help you see that you can give any name for the main, you don't need give the name Main, or the name Clinic until that moment I didn't started to code I am just creating folder, path and file-class-java, and until now the program doesn't know what it will be my main
I would have:
public class Ding{
}
To make the 💮>main<💮(WE START CODE!!!)
a.1) Inside the brackets {} I will have to have :
                public static void main(String[] args) {
        } 

a.2) Inside the brackets {}in an IDE I only have to write >>main<< to the IDE give me option to use the method main(once with the option press enter to accept the option gaved by the IDE), and the IDE will write that command above, easy like that

a.3) This statement is the assignement for the estabilishment of the main.(THESE STATEMENT DO THE MAIN)

let's now have our declaration present;

1) Inside the second group of brackets{} we have to have:💮(LET'S CODE AGAIN, MORE ONE LINE, HARD WORK, TYPE MORE ONE CODE LINE, GOD HELP US!!!!)💮

System.out.println("Hello, World!!!");

b.1) You to do that will type >>sout<< in (small case) and wait the IDE give you the option of choice the comand that create: 

System.out.println();

So now you gonna put inside the parenthesys () quotation marks "", because computer is like love that is blind and don't read, is Because we will write a String, and Strings are write inside quotation marks.

b.1) Write inside the quotation>>Hello, World! << (our declaration that we want outputed by the program)

b.2) Run the programm and will have the result showed in the terminal in the bottom of the window of the IDE as showed in the picture above, after I will show the commands disigned in the IDE>>Run>>create a java-class in the intellij. Rute Bezerra d eMenezes Gondim

No comments:

Post a Comment