What’s the use of JAVAP tool ?

javap disassembles compiled Java files and spits out representation of the Java program. This is a useful option when the original source code is not available. The javap tool in Java is used for examining the bytecode of compiled Java classes. It is a part of the Java Development Kit (JDK) and provides information about … Read more

How can we force the garbage collector to run?

Garbage collector can be run forcibly using “System.gc()” or “Runtime.gc()” In Java, you cannot explicitly force the garbage collector to run. The garbage collector in Java is managed by the Java Virtual Machine (JVM), and it runs automatically to reclaim memory when it determines that objects are no longer reachable and eligible for garbage collection. … Read more

Explain in depth Garbage collector ?

Garbage collection is the process of automatically freeing objects that are no longer referenced by the program. This frees the programmer from having to keep track of when to free allocated memory, thereby preventing many potential bugs. Thus making programmers more productive as they can now put more effort in coding rather than worrying about … Read more

What are Native methods in Java ?

There may be times when we want to call subroutines which are written in some other language other than Java like C++, VB6 etc. In Java, native methods refer to methods that are implemented in a language other than Java, typically in languages like C or C++. These methods are declared with the native keyword … Read more

What is the use if “instanceof” keyword ?

instanceof” keyword is used to check what is the type of object. F The instanceof keyword in Java is used to test whether an object is an instance of a particular class, interface, or subclass. It is a binary operator that returns a boolean value – true if the object is an instance of the … Read more