Basic Structure of a Java Program
Basic Structure of a Java Program: Tutorial 2 --- Understanding our First Java Hello World Program In our previous tutorial we made our first JAVA program, but we didn’t understand anything, so this tutorial is the anatomy of our previous tutorial’s program’ Here’s the CODE: package com.company ; public class Main { public static void main (String[] args) { // write your code here System. out .println( "Hello World" ) ; } } ANATOMY: package com.company ; A package in Java is used to group related classes. Think of it is as a folder in a file directory. The company is function, all functions have their classes; Here the company function’s class is main What is a Function? A method is a block of code which only runs when it is called. You can pass data, known as parameters, into a method. Methods are used to perform certain actions, and the...