SELF INTRODUCTION
Good morning sir/madam. My name is XXXXXXXXXXXXX, and I’m currently pursuing my
final year of Computer Science and Engineering.
Over the past few years, I’ve developed a strong foundation in programming, data
structures, and full-stack web development.
I’ve worked on projects involving [Link], Firebase, and [Link], including a Learning
Tracker system with features like authentication, streak tracking, and leaderboard
functionalities.
I’m also comfortable with core computer science concepts like operating systems, DBMS,
and algorithms.
Beyond academics, I enjoy solving problems on platforms like LeetCode and exploring new
technologies such as machine learning and cloud integration.
I believe my strength lies in continuous learning, problem-solving, and collaborating in a
team to deliver impactful solutions.
My career goal is to grow as a software engineer, gain real-time industry experience, and
contribute to building scalable and efficient systems.
I have strong technical skills in programming and development.
I’m proficient in languages like Java, Python, and C, and I have good problem-solving
experience using Data Structures and Algorithms.
On the development side, I’ve worked with web technologies such as HTML, CSS, JavaScript,
[Link], and [Link], along with Firebase for authentication and database management.
I also have hands-on experience with Database Systems using MySQL and MongoDB, and
I’m familiar with concepts of Operating Systems, Computer Networks, and Object-Oriented
Programming.
Additionally, I’ve recently started exploring Machine Learning and Deep Learning, which I’m
really interested in building expertise on.
Overall, my technical strengths are full-stack development, problem-solving, and working
with cloud-based databases.
WHAT IS AN OBJECT?
An object in Java is a real-world entity that represents an instance of a class.
A class is a blueprint, and an object is the actual thing created from that blueprint.
An object has state (attributes/fields) and behavior (methods/functions).
Car → Class (blueprint)
myCar → Object (instance of Car)
color and speed → State
drive() → Behavior
So, an object is the runtime entity in Java that occupies memory and interacts with other
objects.
OBJECT STORAGE IN MEMORY (HEAP & STACK)
In Java, when we create an object, memory is divided mainly into Stack and Heap areas.
Stack Memory stores method calls, local variables, and references to objects in heap.
Stack is thread-specific, and each thread has its own stack.
Memory is automatically managed, and when a method ends, its stack frame is removed.
Heap Memory stores actual objects and instance variables.
Heap is shared among all threads.
Garbage Collector runs on Heap memory to clear unused objects.
The reference variable lives in Stack, and the object itself lives in Heap.
Stack stores references and local variables.
Heap stores objects.
Garbage Collector cleans Heap, not Stack.
DIFFERENCE BETWEEN JVM, JRE, AND JDK
JVM is the engine that executes Java bytecode.
It converts bytecode into machine code specific to the operating system.
It handles execution, memory management, garbage collection, and security.
JRE provides everything needed to run Java programs.
JRE contains JVM and core class libraries.
JRE does not include development tools like the compiler.
JDK is used for developing Java applications.
JDK contains JRE and development tools such as the compiler and debugger.
JDK is required to write, compile, and run Java programs.
In short, JVM executes bytecode, JRE provides the runtime environment, and JDK provides
development tools.
WHY MAIN() CANNOT BE PRIVATE
JVM needs access to main() to start the program.
When we run a program, the JVM looks for the method public static void main(String[]
args).
If main() is private, JVM cannot access it because private methods are accessible only within
the same class.
The program will compile but will not run.
At runtime, JVM throws an error saying the main method is not found.
Declaring main() as public ensures that JVM can access and invoke it.
In short, main() must be public so JVM can access it.
OS DEPENDENT AND INDEPENDENT
JVM is OS-dependent because every operating system has its own JVM implementation.
JRE is OS-dependent because it contains the OS-specific JVM.
JDK is OS-dependent because it includes JRE and other OS-specific tools.
Java bytecode is OS-independent because it can run on any machine with a compatible JVM.
This is why Java follows the concept of Write Once, Run Anywhere.
WHAT HAPPENS IF WE REMOVE STATIC FROM MAIN()
The code compiles successfully.
At runtime, JVM searches for public static void main(String[] args).
If static is removed, JVM cannot call the method directly.
Non-static methods require an object.
JVM does not create an object to call main().
A runtime error occurs stating that the main method is not found.
main() must be static so JVM can execute it without creating an object.
WHAT HAPPENS IF WE REMOVE STRING[] ARGS?
The code compiles successfully.
At runtime, JVM searches for the exact method signature public static void main(String[]
args).
If String[] args is removed, JVM cannot find the required main method.
A runtime error occurs stating that the main method is not found.
Even if command-line arguments are not used, the parameter must be present.
EXECUTION ORDER OF JAVA PROGRAM
JVM loads the class containing main().
The bytecode file is loaded into memory.
Static variables and static blocks are executed first.
JVM calls the main() method.
Execution starts from the first line inside main().
Objects are created when required.
Instance variables are initialized.
Constructors are executed.
Methods execute when called.
After main() finishes, the program terminates.
Garbage Collector may later free unused objects from Heap.
WHAT IS A CLASS?
A class in Java is a blueprint or template that defines the properties and behaviors of
objects.
It does not occupy memory by itself.
Objects are created from the class.
A class contains fields, methods, and constructors.
Fields store the state of an object.
Methods define the behavior of an object.
Classes define structure and behavior, and objects store actual data.