Started Course: Java In Depth Become a Complete Java Engineer

I have started this course from Udemy and will complete soon with all my effort In Sha Allah:

 

Book Recommendation: Effective Java, Second Edition, Joshua Bloch
Harnessing Java by Kishori Shoron
Head First Java

 

1st video:

Installed JDK
Environment Setup
Made Hello.java with Notepad++
then done javac Hello from cmd:
It made Hello class which is platform independent

2nd Video:

public class HelloWorld1{
	public static void main(String[] args){
			
		System.out.println("Hello World!!");
	
	}
}

//when it has public modifier then you need to make the file name 
//and class name same if it is not then it's okay
E:\javaudemy>javac Hello.java
Hello.java:1: error: class HelloWorld1 is public, should be declared in a file named HelloWorld1.java
public class HelloWorld1{
       ^
1 error

Installing Intellij and Setup for Running Java Application:

Section:3 Classes and Objects

package com.javalearn.fromudemybyheart;

public class Demo {
    static void print() {
        System.out.println("\n\nInside Print......");
        System.out.println("Hello World!!");
        System.out.println();
        System.out.print("Hello World");
        System.out.println(" "); //Print a space
        System.out.print("World!!"); /*  */

    }

    public static void main(String[] args) {

        print();

        int i = 6;
        int j = 5;

        System.out.println(i + j);
        System.out.println(i * j);
        System.out.println(i - j);
        System.out.println(i / j); //System is a class in java library and out is a variable in System class
        System.out.println(i % j);


    }

}

2d Array and 3D array some problem but will clear later now I should move on with other topics.

It would be a great help, if you support by sharing :)
Author: zakilive

Leave a Reply

Your email address will not be published. Required fields are marked *