Volatile Keyword and Transient Keyword in Java

Volatile Keyword in Java Volatile keyword is used to modify the value of a variable by different threads. It is also used to make classes thread safe. It means that multiple threads can use a method and instance of the classes at the same time without any problem. Example class Test  {  static int var=5;  … Read more

Layout Manager in Java

Layout Layout means the arrangement of components within the container. In other way we can say that placing the components at a particular position within the container. The task of layouting the controls is done automatically by the Layout Manager. Layout Manager The layout manager automatically positions all the components within the container. If we … Read more

JDBC in Java

JDBC JDBC is an acronym for Java Database Connectivity. It’s advancement for ODBC (Open Database Connectivity). JDBC is a standard API specification developed in order to move data from frontend to backend. The Java JDBC API (Java Database Connectivity) enables Java applications to connect to relational databases like MySQL, PostgreSQL, MS SQL Server, Oracle, H2 … Read more

AWT in java

AWT AWT contains large number of classes and methods that allows you to create and manage graphical user interface ( GUI ) applications, such as windows, buttons, scroll bars,etc. The AWT was designed to provide a common set of tools for GUI design that could work on a variety of platforms. Java AWT components are … Read more

Applets in java

Applets Applets are small Java applications that can be accessed on an Internet server, transported over Internet, and can be automatically installed and run as a part of a web document. After a user receives an applet, the applet can produce a graphical user interface. Applets in Java are small and dynamic internet-based programs. Generally, … Read more

Method Overriding in Java

If subclass has the same method as declared in the super class, it is known as method overriding in Java. It is required in the case, when we want to use the implementation of the child class instead of parent class. Usage of Java Method Overriding Method overriding is used to provide the specific implementation … Read more

Access Modifiers in Java

Access Modifiers in Java There are two types of modifiers in Java: Access modifier Non-Access modifiers. The access modifiers specify the accessibility or scope of a field, method, constructor, or class. There are four types of Java access modifiers: Private: The access level of a private modifier is only within the class. It cannot be … Read more

Inheritance in Java

By using the inheritance in Java, you can create new classes that are built upon existing classes. When you inherit from an existing class, you can reuse methods and fields of the parent class. Moreover, you can add new methods and fields in your current class also. Benefits of inheritance in java? Method Overriding (so … Read more

Method Overloading in Java | Static Polymorphism

Method Overloading is a feature that allows a class to have more than one method having the same name but different in parameters. Method Overloading is an example of Static and Compile Time Polymorphism (Polymorphism: having more than one form). Two ways to overload a method 1.  Number of parameters. For example: add(int, int) add(int, … Read more