Tag: java

Strictfp keyword in java Strictfp keyword in java ensures that you will get the same result on every platform if you perform operations in the floating-point variable. The precision may differ from platform to platform that is why java programming Read more…

There is only call by value in java, not call by reference. If we call a method passing a value, it is known as call by value. The changes being done in the called method, is not affected in the Read more…

The object cloning is a way to create exact copy of an object. For this purpose, clone() method of Object class is used to clone an object. The java.lang.Cloneable interface must be implemented by the class whose object clone we Read more…

The Object class in Java is beneficial if you want to refer any object whose type you don’t know. Notice that parent class reference variable can refer the child class object, know as upcasting. Let’s take an example, there is Read more…

Encapsulation in java is a process of wrapping code and data together into a single unit, for example capsule i.e. mixed of several medicines.   We can create a fully encapsulated class in java by making all the data members Read more…

Amazon.in Widgets A java package is a group of similar types of classes, interfaces and sub-packages. Package in java can be categorized in two form, built-in package and user-defined package. There are many built-in packages such as java, lang, awt, Read more…

A class that is declared with abstract keyword, is known as abstract class in java. It can have abstract and non-abstract methods (method with body). Before learning java abstract class, let’s understand the abstraction in java first. Abstraction in Java Read more…

The java instanceof operator is used to test whether the object is an instance of the specified type (class or subclass or interface). The instanceof in java is also known as type comparison operator because it compares the instance with Read more…

Runtime polymorphism Runtime polymorphism or Dynamic Method Dispatch is a process in which a call to an overridden method is resolved at runtime rather than compile-time. In this process, an overridden method is called through the reference variable of a Read more…

The final keyword in java is used to restrict the user. The final keyword can be used in many context. Final can be: variable method class The final keyword can be applied with the variables, a final variable that have Read more…

Facebook