Posts

Showing posts from August, 2020

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...

Introduction to Java + Installing Java JDK and IntelliJ IDEA for Java

Image
Introduction to Java + Installing Java JDK and IntelliJ IDEA for Java Tutorial 1--- What is JAVA? Java is an Object Oriented programming language developed by Sum Microsystems in USA in 1991. It was originally called Oak by James Goslin (one of the inventors of JAVA) JAVA = Purely Object Oriented How JAVA works? JAVA is compiled into the bytecode and then it is interpreted to machine code. JAVA Installation: Go to Google & type "Install JDK" = Installs JAVA JDK Go to Gooogle & type "Install IntelliJ Idea" = Installs JAVA IDE JDK = JAVA Development Kit = Collection of tools used for developing and running JAVA programs. JRE = JAVA Runtime Enviroment = Helps in executing programs developed in JAVA. After installing JDK and IntelliJ Idea; the open a new project file; and click on command line app and you'll see something like this-  We'll print Hello World on it (This is the first tutorial so I am not explaining anything, so please stay tuned for next ...