Logo

dev-resources.site

for different kinds of informations.

Java Interview questions for Freshers (1-2)

Published at
1/2/2025
Categories
java
interview
Author
jian_weitee_f32a164fa000
Categories
2 categories in total
java
open
interview
open
Author
24 person written this
jian_weitee_f32a164fa000
open
Java Interview questions for Freshers (1-2)

Edited from: https://www.geeksforgeeks.org/java-interview-questions/

1. Is Java Platform Independent if then how?

Javac compiles the program into bytecode, which is stored in a .class file. This file can be executed on any operating system as long as a JVM (Java Virtual Machine) is preinstalled. Therefore, bytecode can be created on one system and executed on another, making Java platform-independent.

2. What are the top features of Java?

  • Simple: Java is simpler compared to other languages such as C and C++ because it eliminates the need to manually create and release allocated memory using pointers. Instead, Java implements a garbage collection mechanism to automatically release unused references.
  • Object-Oriented: Java is an object-oriented language that supports the concepts of classes and the four pillars of OOP (Object-Oriented Programming).

    • Encapsulation: Controls data access using access modifiers such as public, private, and protected.
    • Inheritance: Promotes code reuse by allowing a child class to inherit the properties and methods of a parent class.
    • Polymorphism: Enables a single method to behave differently based on the object that invokes it. This can be achieved through method overloading (compile-time polymorphism) and method overriding (runtime polymorphism).
    • Abstraction: Allows users to interact with an object through a well-defined interface without needing to understand its implementation details. This can be achieved using abstract classes and interfaces.
  • Multithreaded: Allows multiple threads to run concurrently within a program. A concurrency framework is provided under the java.util.concurrent package.

interview Article's
30 articles in total
Favicon
10 Must-Know Software Testing Interview Questions
Favicon
LeetCode Challenge: 383. Ransom Note - JavaScript Solution ๐Ÿš€
Favicon
LeetCode Challenge: 73. Set Matrix Zeroes - JavaScript Solution ๐Ÿš€
Favicon
LeetCode Challenge: 290. Word Pattern - JavaScript Solution ๐Ÿš€
Favicon
LeetCode Challenge: 205. Isomorphic Strings - JavaScript Solution ๐Ÿš€
Favicon
Your journey to MAANG: Understanding Arrays
Favicon
LeetCode Challenge: 36.Valid Sudoku - JavaScript Solution ๐Ÿš€
Favicon
Top HTML Interview Questions for Frontend Developers
Favicon
Angular Signals and Their Benefits
Favicon
Java Interview questions for Freshers (1-2)
Favicon
ะŸั€ะพัั‚ะฐั ะทะฐะดะฐั‡ะฐ ั ัะพะฑะตัะตะดะพะฒะฐะฝะธั ะฒ Google: Merge Strings Alternately
Favicon
Behavioral Interview Guide for Software Engineers
Favicon
Weekend - Python Interview Questions
Favicon
If You're Looking for Red Flags Once You're in a Job, It's Too Late
Favicon
Js in bits - 12.2(Nullish Colaescing)
Favicon
Js in bits - 12.1(Nullish Colaescing)
Favicon
Js in bits - 11.5(Logical Operators)
Favicon
Js in bits - 11.4(Logical Operators)
Favicon
Js in bits - 11.2.1(Logical Operators)
Favicon
Js in bits - 11.2(Logical Operators)
Favicon
Js in bits - 11.1(Logical Operators)
Favicon
Js in bits - 11.3(Logical Operators)
Favicon
Acing Your Job Application: Tips for Success
Favicon
Js in bits - 10.1(Conditional Branching)
Favicon
Js in bits - 9.4(Comparisons)
Favicon
Js in bits - 9.5(Comparisons)
Favicon
Js in bits - 9.3(Comparisons)
Favicon
Js in bits - 9.2(Comparisons)
Favicon
Js in bits - 9.1(Comparisons)
Favicon
Hiring Best AI Talents: Interview Questions in 2025

Featured ones: