In previous blog, we discussed on String and string constant pool.  It highlighted the issue in String manipulation and how it fill the pool memory.  We not recommended to use String for temporary string statement formation, logger statement, updatable string ...

Manipulation of String (Sequence of characters) is most important aspect of programming language. Name, id, address, role and username all manipulated as String in programming world.  Java is no different from other language while using the String.  In Java, String ...

Java coding practices recommended that maximum 80 characters in single line of the code.  It is best for readability and understand the code. If our class require static members in more than 20 lines of our code and all lines ...

Java methods accept parameters, execute business logic and return results. We can pass multiple argument to the methods and it return only one value from the methods. Some real time scenario, we may require to get more than one return ...

Java encourages use of OOPS features such as inheritance and encapsulation. But in special cases, we want to restrict the change of our class or method or member variables or local variables. Here “final” keyword helps to mark the element ...

Previous post, we discussed on intention to create copy of object in java. In this post,we would discuss on different implementation of object copying. Before discuss on implementation, let us discuss on basic rule of clone copy implementation. 1) Copy ...

The Java language supports three types of comments in code to explain the business logic in code, to explain the algorithm logic to other developers in code itself or to generate the document content in coding itself. Single line comments ...

Earlier we discussed on method overloading, it gives same method name and differ by method signature.  If we are not sure about number of argument(but same type) for the method,  we can’t write one method of each combination of argument ...

                A constructor in Java is a block of code similar to a method that’s called when an instance of an object is created. Constructors are used to initialize the object’s state. Like ...

Variables are used to store data in java run-time.  Methods are used to process access and manipulate the variables. Methods are primary building block in enterprise application as it holds the business logic of an enterprise. Each object in java ...