In Java, it is important to know the basic code structure of this object oriented language. It is the foundation for writing code for your mobile devices. Java is the programming language that powers Android SDK, the integrated development environment (IDE) for software code for Android and so much more.
The basic structure of Java starts with a source file and within the source file, there are classes which represent a piece of your program (goes within a pair of curly braces { }) and within each class there are methods which hold instructions. The methods within a class are always declared with their own set of curly braces { }. Statements are another component of the structure of the Java language are serve as a function or procedure.
Once the source file is ready and completed and you are ready to test your program, it is compiled by like NetBeans to compile your “file.java”. You will then run the program in a JVM (Java Virtual Machine) which ultimately translates the code into something useful and brilliant.