What about that for chapter, I saw to understand in class, reading a book I was went to no where.
To you start a program in Java, with stalled in your machine(computer) the IDE and the Java compiler. Before I say what is a IDE, lets implement an simple program.
You gonna open your IDE, Java compiler is one (JDK for developer) the IDE have many labels, from diferents interprises, anyone will do, but the JDK is need the IDE work for many others languages and not only for Java, so therefor, once opened your IDE you gonna create a new program, I use the Intellij so it creates without a package, here package is something that you can create, but if you use the netbeans, the package will be create as yuo create the project (this one is the one that I am learning), after create the project it gonna appear for you the folder, if you are using the netbeans it will create toghether the main file, but in the inteliji you gonna have to create the main file, so you open if the left bar if collapsed, and open the folder of the project and will be there the src (its appear a folder) and with clicking with the right-mouse-button in the source (src) you gonna choice new -->(next window)--> Java class(you gonna starting naming the file) that you could write something like main (this name is optional you write other thing, using the rule camelcase with also the first letter in capital) once open the fold, the name will match with the name that you create and that name can't be changed so is the name of the file and the name that you gonna see, respecting the paranteses yuo gonna write inside the first {} the name main and wait for the IDE give you the option of create something called main and the IDE gonna write for yuo public static void main(String[] args){}
Respect the {} is very important everything happens inside the {}, so if you don't have this you won't create commands, and they happens one inside the other, with dependency, if one thing is part of other it will be inside the parentesis, is the blocks, and will have blocks inside blocks, so have dependency, or sequency (the blocks are separetely but one after the other if a order depend of that) this also happens when is calling an function.
Function is a method that could be called, so is more usefull, because could have the opportunity and will be there and only gonna work if appear an opportunity and an method is always on, if there will happens mandatorily, because don't need a call to be executed. Rute Bezerra de Menezes Gondim
No comments:
Post a Comment