Course Content:
• Modules: Module 1,2,3,4
• Module 1: Html, CSS, JS
• Module 2: Core Java + Advance Java + Database + SQL
• Module 3: Spring Core + Spring Boot + Microservices+ maven + Git + Docker
+ Aws
• Module 4: Communication Skills + Interview Framing + Resume Prep + Self
Confidence
Java Features
1. Simple
2. Platform Independent
3. Robust (Strong)
• Automatic Memory Management
• Exception handling (self-healing)
4. OOPS (Object Oriented Programming System)
5. Secure
Environment Setup
1. Download and install jdk 1.8 [2 folder]
• JDK (Java Development Kit)[provide set of tools to develop program]
• JRE (Java Runtime Environment)[jre gives us Platform to execute
program,and jvm is inside jre ]
2. set the path
• system variable : C:\Program Files\Java\jdk1.8.0_202
• user variable : %JAVA_HOME%\bin
3. verify
. java -version
Where to write code?
1. Notepad
2. Notepad++
Java program Structure
1. package statement
2. import statement [A--->B]
3. class declaration
4. Methods
5. variable
Translators
Translators are used to convert from one format to another format
We have 3 types of translators
1) Interpreter
2) Compiler
3) Assembler
Interpreter will convert the program line by line (performance is slow)
Compiler will convert all the lines of program at a time (performance is fast)
Assembler is used to convert assembler programming languages into machine
language
How Java Code Compiles
JVM architecture
• Class loader: It will load .class file into JVM
• Method Area: Class code will be stored here
• Heap area: Objects will be stored into heap area
• Java Stack: Method execution information will be stored here
• PC Register: It will maintain next line information to execute
• Native Stack: It will maintain non-java code execution information
• Native Interface: It will load native libraries into JVM
• Native Libraries: Non-java libraries which are required for native code
execution
• Execution Engine: It is responsible to execute the program and provide
output/result. It will
• use Interpreter and JIT for execution.
Variables
• variables are used to store the data during program execution
• We need to specify type of the variable to store the data
• To specify type of data we will use 'data types'
• To declare the variable in Java, we can use following syntax
Data Type
Type of comment in java
1. single line comment --> //
2. multi line commmnet --> /* */
3. documentation commmnet -->
Java Question Paper -1
1) Explain software project layers
2) What is database and why we need it ?
3) What is programming language & why we need programming language ?
4) What are the features of java ?
5) What is JAVA ?
6) What is the difference between C and Java ?
7) What type of applications we can develop using java & brief them ?
8) What is the difference between JDK, JRE and JVM ?
9) What is the execution flow of java program ?
10) What is the difference between interpreter and compiler?
12) Write JVM architecture
13) write a java program to print hello
Java Identifiers
Identifiers are the names given to class Method, interface.
Rules for namming Indetifires:
1. valid char : lower case , Upper case, digit, _, $
2. Start with : letter,_, $. it cannot start with digit
3. case Sesitivity : car, CAR ,cAR,Car
4. Reserved KeyWords : (int, for,if,class) cannot be used
Convention For Naming Identifiers(best for Identifiers):
1. CamelCase: for classes, method and variable eg: carName, cityName
2. MeaingFul : String cityName = "10202" ,cityName="Agra"
Eg: Identifiers
age ----------> valid
_marks --------> valid
$value --------> valid
8marks ----------> invalid
class -----------> invalid
my-name ---------> invalid
@cityName -------> invalid
calCulater ------> valid