Skip to main content

Posts

Contructor In Java

Constructor in Java In Java, constructor is a block of codes similar to method. It is called when an instance of object is created and memory is allocated for the object. It is a special type of method which is used to initialize the object. Note:  It is called constructor because it constructs the values at the time of object creation. It is not necessary to write a constructor for a class. It is because java compiler creates a default constructor if your class doesn’t have any. Rules for creating java constructor There are basically two rules defined for the constructor. Constructor must  have the  same  name as its class name Constructor must not have return type Types of java constructors two types of constructors in java: Default constructor (no-arg constructor) Parameterized constructor Java Default Constructor A constructor is called “Default Constructor” when it doesn’t have any parameter. Syntax of default constructor: ...
Recent posts
WHAT IS JAVA Java is a general-purpose computer-programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible. Developer :  Sun Microsystems (now owned by Oracle Corporation) Typing discipline :  Static, strong, safe, nominative, manifest First appeared :  May 23, 1995; 22 years ago Designed by :  James Gosling License :  GNU General Public License, Java Community Process Java is − Object Oriented  − In Java, everything is an Object. Java can be easily extended since it is based on the Object model. Platform Independent  − Unlike many other programming languages including C and C++, when Java is compiled, it is not compiled into platform specific machine, rather into platform independent byte code. This byte code is distributed over the web and interpreted by the Virtual Machine (JVM) on whichever plat...

Spring Framework Overview

                     Spring Tutorial Here in this  spring tutorial we will give in-depth concepts of Spring Framework with examples. Spring  Framework was  developed by Rod Johnson in 2003 . Spring framework makes the enterprise application development easy and fast. This Tutorial is helpful  beginners and experienced persons. Spring Framework Overview Spring is a  lightweight  framework introduced by  Rod Johnson in 2003  .  It can also be integrated with  other frameworks such as Hibernate, struts, EJB, JSF etc. Spring framework has the following modules s IOC, AOP, DAO, Context, ORM, WEB MVC etc.  Let's try to  understand the IOC and Dependency Injection first. Inversion Of Control (IOC) and Dependency Injection The design patterns that are used to remove dependency from the programming code. Which makes the code development  easy to test and maint...

Introduction To Spring Framework

                    Spring Tutorial Here in this  spring tutorial we will give in-depth concepts of Spring Framework with examples. Spring  Framework was  developed by Rod Johnson in 2003 . Spring framework makes the enterprise application development easy and fast. This Tutorial is helpful  beginners and experienced persons. Spring Framework Overview Spring is a  lightweight  framework introduced by  Rod Johnson in 2003 .  It can also be integrated with  other frameworks such as Hibernate, struts, EJB, JSF etc. Spring framework has the following modules s IOC, AOP, DAO, Context, ORM, WEB MVC etc.  Let's try to  understand the IOC and Dependency Injection first. Inversion Of Control (IOC) and Dependency Injection The design patterns that are used to remove dependency from the programming code. Which makes the code development  easy to test and maintain. Let's...

Java Basic Syntax

                                                Basic Syntax Of Java When we talk about Java program, it can be called as a collection of objects which can be called through methods. Let us now briefly look into  it. Object  − Objects in java behaviors and states . lets consider a example of dog: dog  class state includes its name, breed ,color  and has behavior wagging their tail, barking, eating. object  in  java  classed as  an instance of a java class.   Class  − A class can be defined as a template/blueprint that describes the behavior/state that the object of its type supports.   Methods  − A method is basically a behavior. A class can contain many methods. It is in methods where the logics are written, data is manipulated and all the actions are executed.   Instance Variables  − Eac...