Narayana Tutorial

Online Java Tutorial Blog

Category: Java Basics

Java basic interview questions and answers are very important before going to Java interview. So read the following questions and answers and refresh our mind.

Difference between Class.forName() and newInstance() in java

Difference between Class.forName() and newInstance() in java   Class.forName() returns the Class-Type for the given name. Means that it will return reference to a class and load the available all static blocks not instance methods. if you are interested only in the static block of the class , the loading the class only would do , […]

Which algorithm is used by garbage collector?

Which algorithm is used by garbage collector   Garbage collector uses many algorithms but the most commonly used algorithm is mark and sweep.   NarayanaswamyHello! I am Narayanaswamy founder and admin of narayanatutorial.com. I have been working in IT industry more than 7 years. NarayanaTutorial is my web technologies blog. My specialties are Java / […]

Which part of JVM will allocate the memory for a java program?

Which part of JVM will allocate the memory for a java program?   Class loader sub sytem of JVM will allocate the necessary memory needed by the Java program.   NarayanaswamyHello! I am Narayanaswamy founder and admin of narayanatutorial.com. I have been working in IT industry more than 7 years. NarayanaTutorial is my web technologies […]

What is difference between abstract class and interface?

What is difference between abstract class and interface?   Abstract class may or may not be contain abstract methods but a class should be called as abstract when it contains at least one abstract method. It can also contain n numbers of concrete method. Interface can contain only abstract ( non implemented) methods. The abstract […]

Narayana Tutorial © 2018 Frontier Theme
Show Button
Hide Button