Code Pumpkin

Tag Archives: Java keywords

Subscribe

Access Modifiers in Java

September 2, 2017
Posted by Pumpkin

In this article, we will discuss one of the basic feature of Java- Access Modifiers. As the name suggests access modifiers in Java helps to restrict the scope of a class, constructor, variable, method or data member. Assigning an access modifier to a class, constructor, field or method is also sometimes referred to as "marking" that […]

What is the use of private constructor in java?

In Java, we can use any access modifier (i.e. public, protected or private) with constructor.  So, what are the uses of making constructor private? First thing that strikes your mind is Singleton Design Pattern which is also one of the most asked Core Java Interview Question to the 3-4 yr exp Java developers.  Apart from creating singleton class, private constructor […]

Interface vs Abstract class in Java

July 7, 2017
Posted by Pumpkin

The difference between interface and abstract class is one of the most asked interview questions for entry level java developer interviews. Even though both are used to achieve abstraction in java, there are significant differences between them. With support of default methods (introduced in Java8) and private methods (introduced in Java9) in interface, the gap between […]

final keyword in Java

May 14, 2017
Posted by Pumpkin

final is a keyword in Java. It can be used with variable, method or class. In this article we will see how we can make variable, method or class final in java and what are the advantages of doing so. If we make a method final, we can not override it in subclass.If we make […]

Transient Keyword In Java

May 13, 2017
Posted by Pumpkin

The transient keyword in java is used on class attributes to indicate that serialization process of such class should ignore such attributes for any instance of that class. When JVM comes across transient keyword, it ignores original value of the variable and save default value of that variable data type. transient keyword plays an important […]


Total Post : 80
Subscribe
Contribute Your Articles

Interview Experiences

Related Books

Like Us On Facebook

Alexa Page Rank