Java_Core_2022
Java_Core_2022
0
-- MODULE 1 --
Day 1 --Installation of Java & Intellij IDEA
--IDE ? Integrated Development Environment
--Creating a new project in Intellij IDEA
--Exploring Settings of Intellij
--Font Size
--Theme
--Enabling zoom feature
--Writing your first program
--main public static void main(String[] args) { }
--sout System.out.println();
--Running a Java program
--Comments
--Single Line //
--Multi line /* comments */
--Understanding the need of a variable
--Intro to data types
--int - stores integers Ex - 1 2 3
--String - stores combination of characters Ex - "Shery"
Day 2 --Variables
--can contain Data or Object References (DTL)
--Variable declation, Initialization
--Role of + operator between String & numbers
--String + String = String - Concatenation
--String + int = String - Concatenation
--int + int = int - Arithmetic Addition
--Naming Convention for Class/Variable/Method name - identifiers
--Must start with an alphabet or _ or $
--Can end with a alphabet or _ or $ or numeric digit
--Spaces are not allowed
--No reserved keyword
--Java is CASE SENSITIVE
--Cases and Conventions for clean and readable code.
--PascalCase - Class & Interface
--camelCase - variable and method name
--Game of brackets
--( ) - Methods - Parantheses
--{ } - Scope/body - Curly
--[ ] - Array - Square
--<> - Generics - Angular
--Package
--Creating a new package
--package statement should be the first line in the java code file
--Used to group a similar set of classes (code management)
--Default Library package imported by default in every Java class
java.lang.*
--Math class
--Present inside java.lang
--abs()
--floor()
--sqrt()
--cbrt()
--ceil()
--pow(double a, double b)
--round()
--max(double a, double b)
--Ternary Operator
--<condition> ? true : false;
--Type Coversion or Type casting
--Implcit or Widening
--order byte->short->int->long->float->double
char->int
--Expilicit or Narrowing
byte<-short<-int<-long<-float<-double
short<-char<-int
--syntax
<data_type><var> = <data_type><var or val>;
--Type Promotion
Day 8 --Loops
--Need of loops in programming
--Types
--Entry Controlled
--Exit Controlled
--ArrayIndexOutOfBoundsException
--NullPointerException
Day 17 --Methods
--Method Signature / Method Prototype / Method Definition
--Need of methods
--Method types
--static
--Invoke by class name
--instance / factory method / non static
--Invoke by object's reference
--Programs
--Factorial
--Strong Number
--145 = 1! + 4! + 5!
--Armstrong Number
--153 = 1^3 + 5^3 + 3^3
--Special Number
--109 = 1 + 0 + 9 = 10 = 1 + 0 = 1
Day 18 --Arguments
--Formal Arguments
--Actual arguments
--Arguments Passing
--Pass by value
--Passing Array Objects.
--varargs
--exactly three dots (...)
--variable length arguments
--there can be only one varargs in a method
--if there are other parameters then varargs must be declared in the
last.
--BufferedReader API
--InputStreamReader
--Reading data through BufferedReader
--readLine()
--Parse Strings into respective data type
--Why BufferedReader
Day 26 --Hashing/HashSet/Map