Java Short Questions for 1 Marks
- Difference between Abstract and Concrete Class ?
- Difference between Overloading and Overriding ?
- Types of Inner classes ?
- Difference between TreeMap and HashMap ?
- Difference between List , Sets and Maps ?
- Difference between Private , Public and Protected ?
- What is role of Synchronization in Java ?
- What is Default Access ?
- Difference between Vector and ArrayList ?
- Difference between class and objects ?
- Describe Garbage Collection in Java ?
- What are the types of Polymorphism in Java ?
- Different ways of using threads ?
- Difference between Composition and Inheritence ?
- What are Static variables ?
- Difference between Interfaces and Abstract classes ?
- Explain Constructor ?
- What is Dynamic Binding ?
- What is the use of Volatile Keyword ?
- Explain Serialization ?
- What is the use of Transient Keyword ?
- What are Static Methods ?
- What is a Final variable ?
- What is a Final Method ?
- What is a Final Class ?
- What is an Immutable Object ?
- Difference between checked and unchecked exceptions ?
- Give an Example of checked and unchecked exception ?
- Can a class extend an interface ?
- Does Java support multiple inheritence ?
- What do you mean by return type Void ?
- Is Java Compiled or an Interpreted language ?
- What is a class file ?
- Why Java is a called a platform independent language ?
- Explain the use of "Native" keyword ?
- What is "super" used for ?
- What is "this" keyword used for ?
- What is the default value of local variable ?
- What will happen if we declare a class abstract as well as final ?
- What is Encapsulation ?
- Explain Inheritence ?
- Explain Polymorphism ?
- Difference between assignment and initialization ?
- Difference between boolean and Boolean ?
- What is an Immutable object ?
- Give an example of immutable class ?
- What is Casting ?
- Explain Finalize () ?
- What are Marker Interfaces ?
- Difference between String and StringBuffer ?
- Difference between Process and Thread ?
- Explain Thread states ?
- What is a Deadlock ?
- Difference between Serialization and Deserialization ?
- Difference between Java 1.4 and Java 5 ?
- Explain Autoboxing ?
- What are Wrapper Classes ?
- What are Primitive Wrapper Classes ?
- What is automatic conversion of primitive data type to its Wrapper class called ?
- What is "Import" used for ?
- Difference between HashMap and HashTable ?
- What is an Iterator ?
- What is JVM ?
- What is JDK ?
- What is JRE ?
- Different types of memory used by JVM ?
- What is a Class Loader ?
- Does Static Public Void instead of Public static Void gives compilation error ?
- Does constructor returns any value ?
- Can we make constructor final ?
- Why main method is static ?
- What is a Static Block ?
- Can we overload main method ?
- Can we declare main method as final ?
- What is Static binding ?
- What is Dynamic Binding ?
- Can we declare an interface method static ?
- Can an interface be final ?
- Can we declare interface methods as private ?
- What is a Static import ?
- Base class for Error and Exceptions ?
- Difference between StringBuffer and StringBuilder ?
- Default Package for Collection classes ?
- Difference between List and Queue ?
- Difference between Vector and ArrayList ?
- Which is the base interface for all collection classes ?
- What are concepts introduced with Java 5 ?
- Difference between C++ and Java ?
- Can we override static methods ?
- What precaution should be used while dealing with static variables ?
- Can we override main method ?
- Difference between sleep and wait ?
- Name Wrapper classes available for primitive types ?
- Explain System.out.println ?
- Explain public static void main() ?
- What is Java Byte Code ?
- What is the relation between class file and byte code ?
- How can we make the object immutable ?
- What is the purpose of making an object immutable ?
- Explain the scenerios to choose between String , StringBuilder and StringBuffer ?
- Explain java.lang.OutOfMemoryError ?>
- Difference between arraylist and linkedlist ?
- Difference between implicit and explicit type casting ?
- Can we have an abstract class without abstract methods ?
- Can we have abstract methods in a class which is not Abstract ?
- Array list , Map and Set Classes or Interfaces ?
- Difference between .equals and == ?
- What are the methods of Object class ?
- What are the class loaders ?
- What are the different class loaders used by JVM ?
- Have you ever destroyed objects yourself ?
- Should we override finalize method ?
- Will finally be executed for handled or unhandled exceptions ?
- Difference between protected and default Modifier ?
- Can we overload methods on a single parameter with data types as int and long. For example int calculate(int x) and int calculate(long x) ?
- What is keyword instanceOf used for ?
- If we obj is an object of Class A and Class A extends Class B , What will obj instanceof B will return ?
- What is assert keyword used for ?
- What is the default value for Object Reference in Java ?
- What is a Default Constructor ?
- Will Compiler creates a default no argument constructor if we specify only multi argument constructor ?
- What will happen if we make the constructor private ?
- How can we create objects if we make the constructor private ?
- Is that the only way to initialize the object in that case ?
- Is constructor inherited ?
- What will happen if we remove the static keyword from main method ?
- Which is the super class of all classes in java ?
- Why Java don't use pointers ?
- Can we use both "this" and "super" in a constructor ?
- Can we achieve runtime polymorphism by data members ?
- Do we need to import java.lang.package ?
- Can i import same package / class twice ?
- Is it necessary that each try block to be followed by catch block ?
- Can finally block be used without catch ?
- Can an exception be rethrown ?
- What is exception propagation ?
- What is the use of toString method ?
- Difference between nested and inner classes ?
- What is a nested interface ?
- Can an unreferenced object be referenced again ?
- What kind of thread is garbage collector thread ?
- What is an Externalizable interface ?
- Difference between serializable and externalizable interface ?
- What is the purpose of System Class ?
- What is Locale ?
- Situations where "this" keyword can be used?
- Can we declare interface method's private?
- What is the problem with following code?
- Can we instantiate the object of derived class if parent constructor is protected ?
- Can we declare an abstract method private ?
- Can Abstract methods in parent class have a body ?
- Can we declare a class static ?
- Can we reduce the visibility of the overridden method ?
- Can we make an object final i.e immutable using final keyword ?
- What are the design considerations while making a choice between using interface and abstract class ?
- What are new features introduced with Java 8?
- What is a Lambda Expression ? What's its use ?
- Can we have a default method definition in the interface without specifying the keyword "default" ?
- Can we use static method definitions in Interfaces ?
- Can we access Interface static method using Interface references ?
- What is the difference between Data Type and Data Structure ?
- Is it correct to say that Interfaces are abstract data types ?
- Which sorting algorithm is used by Collections.sort() in Java ?
No comments:
Post a Comment