In OOP, how does abstraction differ from encapsulation? It includes the JRE and tools like JavaDoc and Java Debugger. Conversely, the Java Development Kit (JDK) is a Software Development Kit, allowing one to develop, compile and execute applications and applets with Java. Java Runtime Environment (JRE) provides the requirements for Java programs to be executed and contains the JVM, Java class libraries and Java class loader. Practically, you can replace a class with its subclass and Java’s inheritance mechanism follows this principle. Liskov’s Substitution Principle prescribes that you can replace an object with an instance of its subtype without corrupting the program. Can you override a private method in Java? What’s the difference between CountDownLatch and CyclicBarrier? Why to use PreparedStatement over Statement? Distinguish between throw and throws in Java What do System.gc() and Runtime.gc() methods do? Can you store null keys/ values and duplicate keys/values in a Java HashMap? What’s the difference between fail-fast and fail-safe? Is Java pass-by-reference or pass-by-value? How can you ensure that N threads can access N resources without deadlock? Will finally block execute if you put System.exit () in catch or try block? Why does Java not support multiple inheritances? It also reflects the properties of an object. State: It is represented by attributes of an object.A typical Java program creates many objects, which as you know, interact by invoking methods. Object: It is a basic unit of Object Oriented Programming and represents real-life entities. A class can implement more than one interface.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |