Scroll to top

Search Results for:

Posted by JBT
April 21, 2012

Access Modifiers in Java

Access modifiers (AM) in java help you set the level of access you want for your class, constructor, variables as well as methods. Access levels (Access Control) can be changed by using different access modifiers. There are three access modifiers but four access control. Default is the access control which will be set when one does not specify any access modifier.

Read More
Posted by JBT
April 21, 2012

String Builder

A String Builder is like a String but can be modified. String has the drawback...

Read More
Posted by JBT
April 21, 2012

Serialization in Java

Java object serialization is used to persist Java objects to a file, database, network, process or any other system. Serialization flattens objects into an ordered, or serialized stream of bytes. The ordered stream of bytes can then be read at a later time, or in another environment, to recreate the original objects.

Read More
Posted by JBT
April 21, 2012

Overloading in java

An Overloaded Method gives you an option to use the same method name in a class but with a different argument.

Read More
Posted by JBT
April 21, 2012

Constructor in Java

Constructor in Java can be seen as a special method 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. A constructor is used in the creation of an object of a class.

Read More
Posted by JBT
April 21, 2012

Inner Class

Java Inner classes are classes within class. An inner class instance has a special relationship with outer class. This special relationship gives inner class access to a member of the outer class as if they are the part of the outer class.

Note: Java Inner class instance has access to all member of the outer class(Public, Private & Protected)

Read More
Posted by JBT
April 21, 2012

Inheritance

Java Inheritance defines an is-a relationship between a superclass and its subclasses. This means that an Object of a subclass can be used wherever an object of the superclass can be used. Class Inheritance in Java is used to build new Classes from existing Classes. The inheritance relationship is transitive: if Class x extends Class y, then a Class z, which extends Class x, will also inherit from Class y.

Read More
Posted by JBT
April 21, 2012

Java Method Override

A class inheriting the method from its superclass has the option to override it. The benefit of overriding is...

Read More
Posted by JBT
April 21, 2012

Java Exceptions Tutorial

Exception in Java is used to handle errors or any other exceptional event that occurs in the normal flow of a program. There are several way Exception can occur in Java.

  • Data provided is not in expected format(eg. int instead of String).
  • DB cannot be connected.
  • Network connection Lost.
  • An object is null.
  • .....

Read More
Posted by JBT
April 20, 2012

Collection in Java

Collection Framework has been added in JDK 1.2 and has been expanded in 1.4 -1.6...

Read More