Browsing category Java

OOPS inheritance design pattern

Inheritance In Java


Object oriented programming(OOPS) paradigm enforces code re-usability and avoid redundant code. To implement the code re-usability, OOPS introduces the concept of inheritance. Let see the “Inheritance” definition, A class that is derived from another class is called a subclass (also a derived class, extended class, or child class). The class from which the subclass is

Constructor in java

Constructors in Java


                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 methods, a constructor also contains collection of statements that are executed at time of Object

Methods_In_Java

Methods in Java


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 talks with other objects by invoking methods. Good programmers write in a modular fashion which

java static member and static variables

java static variables and static methods


Static members help to write code to support sharing of objects or to create only one instance of class (Singleton pattern) in application. Let us discuss what static member in Java.  Static members are class variables and methods with modifier “static”. Static members are called class variables and class methods. Static members are class level

private public protected in java class modifiers

public private protected access modifier in java


Having the door would not ensure safety for home.  Locking the door is important and ensures the safety of the home. The same analogy applicable for Java object oriented feature as well. Writing a class in java would not provide abstraction and encapsulation. We have to write the code by exposing only the required information

Writing class and objeccts

Writing a class and creating object in Java


A class is a blueprint or a template for creating objects and defines its properties and behaviors. Java class objects exhibit the properties and behaviors defined by its class. A class can contain fields and methods to describe the behavior of an object.A class is a blueprint or a template for creating objects and defines

Java naming convention and naming standards

Java naming conventions


“A name represents identity, a deep feeling, and holds tremendous significance to its owner.” Naming the code artifacts is important in programming coding practices. In Java, we would name the variables, methods, constants, classes and interfaces. We have to follow the standard naming conventions for each pieces. Proper and meaningful names helps others to understand

Eclipse shortcut for java development

Eclipse Shortcut Keys for Smart Developers


Most of the software developer use integrated development environment (IDE) to write code. A Java IDE (Integrated Development Environment) is a software application which enables users to more easily write and debug Java programs. Many IDE’s provide features like syntax highlighting and code completion, which help the user to code more easily. More specifically Eclipse

Java Eclipse development framework

Configure Eclipse IDE for Java Development


Developers should use the proper, available smart tools for their development environment for faster development. Eclipse java development environment provides editor to fast development and easy to debug the code. We would discuss the configuration of java eclipse development environment. Java standard edition (SE) is freely available from the link Download Java. You can download

OOPS

Object Oriented Programming in Java


More number of developers are familiar and expert in procedural languages like C and Visual Basic.  We can develop the software solution by procedural languages, then why it is required to move to object oriented programming (OOPS)? Why OOPS has better industry reception than procedural languages? Finally why Java runs on billions on devices than