Difference Between JVM, JRE and JDK Software JDK contains JRE ( Java Runtime Environment ) JRE contains JVM ( Java Virtual Machine ) JVM contains JIT ( Just In Time ) Once we install the JDK all other components of JDK get installed. JD… Read more
Difference Between JVM, JRE and JDK Software JDK contains JRE ( Java Runtime Environment ) JRE contains JVM ( Java Virtual Machine ) JVM contains JIT ( Just In Time ) Once we install the JDK all other components of JDK get installed. JD… Read more
if statement int a=10, b=5; if (a>b) { System.out.println("True"); } Output True if else statement int a=10, b=5; if (a<b) { System.out.println("True"); } else { System.out.println("Fal… Read more
Compile Time Polymorphism Vs Run Time Polymorphism Compile Time Polymorphism Also known as Static Binding , Early Binding and Overloading . Compile Time Polymorphism is resolved during compiler time. Provide faster execution. Less flexible. Example of Compi… Read more
Checked Vs Unchecked Exceptions in Java In java there are two type of exceptions are generated. i.e. Checked Exception Occur at compile time. Also known as Compile Time Exception . Checked by the compiler. Handled during the time of compilation. JVM needs … Read more
== Vs .equals() method in Java == == is a Operator. Use == operators for address comparison. Example : public class Demo { public static void main(String[] args) { String s1 = new String("Welcome"); Str… Read more
Super vs This keyword Super keyword Used to access methods of the parent class. Represents a current instance of parent class. Used to call the default constructor of the parent class. Example : class Easy { int a = 40; static int … Read more
String Class Vs String Buffer String Class Immutable. Object length Fixed. Slow and consumes more memory during Concatenation. Every time it creates new instance. String constant pool. storage Overrides the equals() method of Object. Less functionality. … Read more
Method Overloading in Java When a class has multiple methods having same name but different in parameters known as Method Overloading. Advantage It increases the readability of the program. Different ways to overload the method By changing no. of argume… Read more
Abstract Vs Interface Abstract Class It can have abstract and non-abstract methods. Doesn't support multiple inheritance. It can have final, non-final, static and non-static variables. Provide the implementation of interface. The abstract keyword is us… Read more
Constructor in Java It is a special kind of method which is used to initialize the object. A block of codes same as the method. It is called when an instance of the class is created. Types of Constructor Default constructor ( no-argument ) Par… Read more
Variables in Java A variable is a container which holds the value. Variable is a name of memory location. It is a combination of "vary + able" that means its value can be changed. Types of Variables Local variable Instance variable Stat… Read more
Class Vs Object Class A class is a User Defined Blueprint or Prototype. It represents the set of properties or methods. Modifiers - Name should begin with a letter. Class name - The name should begin with a letter. Superclass - Preceded by the keyword ex… Read more
Awt Vs Swing SNo. AWT Swing 1 AWT stands for Abstract windows toolkit. Also called as JFC’s. (Java Foundation classes). 2 Heavy weight component. Light weight component. 3 AWT components require java.awt package. Swing components require javax.swing package. … Read more
Logical vs Physical DFD Logical DFD It depicts how the business operates. The processes represent the business activities. The data stores represent the collection of data. It s how business controls. Physical DFD It depicts how the system will be imp… Read more