πŸ”₯ Special Offer: Flat Discount on Your Favorite Courses! Use Coupons GET200OFF GET500OFF
β†’ Grab Offer Now ←

Java Basic Interview Questions - 1


1. What is Java ?
  • Java is a High-Level Object-Oriented Programming Language.

    High-Level Language: A high-level language is a programming language that is easy for humans to read, write, and understand.
    • You don't deal with complex hardware details
    • The language uses simple English-like syntax
    • The compiler/JVM handles low-level work automatically

    Object-Oriented Programming (OOP): OOP means the language is based on objects.
    • Everything is written using classes and objects
    • Code becomes modular, reusable, and easy to maintain
    • Supports OOP concepts like Encapsulation, Inheritance, Polymorphism, Abstraction
2. Where is Java used in real world ?
  • Java is used to create different types of applications:

    Desktop Applications: Softwares that run on computers.
    • Examples: Media players, editors, tools
    Web Applications: Websites and web-based systems that run on servers.
    • Examples: Online banking systems, e-commerce websites
    Enterprise Applications: Large business systems used by big companies.
    • Examples: ERP systems, CRM systems, billing systems
    Cloud-Based Applications: Online scalable services that run on cloud platforms.
    • Examples: Microservices, distributed cloud apps
    Mobile Applications: Android apps built using Java.
    • Examples: Chat apps, shopping apps, utility apps
3. What are the features of Java ?
  • Important Features of Java:

    Platform Independent: Java code can run on any operating system because of the JVM.
    • "Write Once, Run Anywhere" (WORA)
    Portable: Java programs can be easily moved from one system to another without changes.
    • Bytecode makes Java highly portable
    Secure: Java provides a secure runtime environment using bytecode verification and security APIs.
    • Helps protect applications from viruses and unauthorized access
    Object-Oriented: Java is based on objects and supports OOP concepts for better code management.
    • Encapsulation, Inheritance, Polymorphism, Abstraction
    Robust: Java is strong and reliable due to memory management, exception handling, and garbage collection.
    • Prevents crashes and improves stability
4. Is Java 100% Object Oriented ?
  • Is Java 100% Object-Oriented?

    No, Java is not 100% object-oriented.
    • Java supports primitive data types such as int, char, byte, boolean, long, float, double, short.
    • These primitive types are not objects, so Java cannot be considered fully object-oriented.
5. What is WORA (Write Once Run Anywhere) ?
  • Meaning: WORA means once you write a Java program, it can run on any operating system without changing the code.
    • Java code is not tied to Windows, Mac, or Linux
    • The same program runs everywhere
    How does Java achieve WORA? Java uses Bytecode and the Java Virtual Machine (JVM) to achieve platform independence.
    • Java compiler converts code into Bytecode
    • Bytecode is the same for all platforms
    • Each operating system has its own JVM that runs the Bytecode
    Result: The same Java program runs on any device that has a JVM.