• Collection in Java

    Collection in java Collection Framework has been added in JDK 1.2 and has been expanded in 1.4 -1.6 Interface & Classes of Collection Framework Collection  in java is a  API provides a group of interface to choose from, but it also gives you some concrete classes to directly play with. Core Interfaces Collection List Set SortedSet(Extends […]

    Posted in: Java

  • Java Exceptions

    Exceptions Exception are used in Java to handle errors or any other exceptional event that occurs in the normal flow of program. There are several way Exception can occur in Java. Data provided is not in expected format(eg. int instead of String). DB can not connected. Network connection Lost. Object is null. Java Exception Hierarchy […]

    Posted in: Java

  • Override

    Override Class inheriting the method from its super class has the option to override it. Benefit of overriding is the ability to define behaviour specific to particular class. Method Overriding Example

    Method Override Rules Overriding method can not have more restrictive access modifier than the method being overriden but it can be less. The […]

    Posted in: Java

  • Overloading

    Java Overloading Overloaded method gives you an option to use the same method name in a class but with different argument. Method overloading is a controversial language feature, especially in the context of Object Oriented languages, where its interaction with overriding may lead to confusing semantics. One of the main arguments against overloading is that […]

    Posted in: Java

  • Java Interface

    Interface Creating an Interface means defining a Contract. This Contract states what a class can do without forcing how it should do. Declaring an Interface Interface can be defined with Interface keyword. Java Interface Example

    Rules for Declaring Interface There are some rules that needs to be followed by Interface. All Interface methods are […]

    Posted in: Java

  • Static Keyword

    What is Static Static is a Non Access Modifier. Applicable to Static keyword can be applied on Method Variable Class nested within another Class Initialization Block Not Applicable to Static keyword can not be applied to Class (Not Nested) Constructor Interfaces Method Local Inner Class(Difference then nested class) Inner Class methods Instance Variables Local Variables […]

    Posted in: Java

  • this keyword

    What is this this is a keyword in Java. Which can be used inside method or constructor of class. It(this) works as a reference to current object whose method or constructor is being invoked. this keyword can be used to refer any member of current object from within an instance method or a constructor. this […]

    Posted in: Java

  • Constructors

    Constructors Constructors in Java can be seen as Methods in a Class. But there is a big difference between Constructors and Methods. These differences can be defined in terms of purpose, syntax and Invocation. Purpose of Constructor (Vs Method) Constructors have only one purpose in life and that is to create an Instance of a […]

    Posted in: Java

  • Java Class & Object

    Java Class & Object: Class Class is a template for creating objects which defines its state and behavior. A class contains field and method to define the state and behavior of its object. Syntax for Declaring Class:

    Class_Name Unique name for the class in a specific package. Super_Class_Name Name of the class which the […]

    Posted in: Java

  • Non Access Modifiers

    Non Access Modifiers Here in this article you will learn about Non Access Modifiers. Below mentioned are the Non Access Modifiers available in Java. Final Abstract Static Strictfp Native Synchronized Transient Final Non Access Modifiers Final modifiers are applicable to : Class Method Instance Variable Local Variable Method arguments Final Class : A class when […]

    Posted in: Java