OOPS Concept

Encapsulation: Wrapping up of data under a single unit. Variable or data hidden from other classes Getter/Setter Concept Advt: Data-Hiding, Increase Complexity,Reusability and Easy Testing Polymorphism: Polymorphism is the ability of an object to take on many forms. Parent class reference is used to refer to a child class object. Any Java object that can... Continue Reading →



Collection: Consistent API Reducing programmer efforts Increase Speed and quality Iterators: Retrieve elements one by one Types of Iterators Enumeration Interface used get elements of legacy collections (vector, hashtable) Remove operation cannot be performed Only forward direction is possible Iterator Can be used all collections types Support remove operation Cannot support adding new or replacing... Continue Reading →

Regular Expression

Regular Expression: Pattern used to define pattern [ Pattern.compile(pattern) ] Matcher matches Flags Pattern.CANON_EQ Enables canonical equivalence Pattern.CASE_INSENSITIVE Enables case-insensitive matching. Pattern.COMMENTS Permits whitespace and comments in the pattern. Pattern.DOTALL Enables dotall mode. Pattern.LITERAL Enables literal parsing of the pattern. Pattern.MULTILINE Enables multiline mode. (?m). Pattern.UNICODE_CASE Enables Unicode-aware case folding. (?u). Pattern.UNIX_LINES Enables UNIX lines... Continue Reading →


Streams: Process collection of objects It is not DS it take input from collection, array and I/O channels Did Not change data structure only provide result according to pipelined methods. Intermediate Operation Map The map method is used to map the items in the collection to other objects according to the Predicate passed as argument.... Continue Reading →


Mulithreading: Allow two or more parts of program execute concurrently Threads are lightweight processes in process. Creation of Thread Extending Thread Class Implementing runnable interface Thread Class vs Runnable Interface Class cannot extend another class if extending thread class (not multi inheritance) Thread class have in built methods like yield and interrupt. Synchronized blocks Applied... Continue Reading →

Java Basics

Class : User defined blueprint or prototype for which objects are created. It contain properties or methods for all objects. <<access_modifier>> <<keywords>> <<class_name>> extends implements  { /************ * * Sample Class structure * ******/ } Constructor used to create new objects Fields/Properties provide state Methods manipulate state of object Type of classes: Inner Class :... Continue Reading →


JDK: JDK is intend to developer as it contain development tools such as compiler, javadoc, java debugger etc. Virtual Machine is software implementation of machine. Java is designed to run on virtual machine. VM: Self Contained simulation of physical machine. Single program execution VM or System VM for execution of OS. Process : Instruction Fetch,... Continue Reading →

Playing with Streams

Hi! Guyz, I just amazed by a example during my learning of java8 stream API let me tell you. Earlier if I have a list of objects and I want them to be filtered and made groups of no of objects on basis of some property of Object. I used to follow the approach shown... Continue Reading →

Lambdas and Functional Interfaces

This is a one big contribution of java 8 in development. Lambdas treat functionality as method argument. In its simplest form, a lambda could be represented as a comma-separated list of parameters, the! symbol and the body. For example: Arrays.asList( "a", "b", "d" ).forEach( e -> System.out.println( e ) ); argument e  is being inferred by... Continue Reading →

Create a website or blog at WordPress.com

Up ↑