Exceptions in Java
In this article, we are going to discuss Exceptions in Java. And following topics. What is the meaning of exception handling? Default exception handling in java Hierarchy of Java Exception classes Different Between Exception and Error Types of Java Exceptions Checked Vs Unchecked Exceptions Fully checked Vs Partially checked Introduction: Exception: An exception is …. Read More
Multithreading in Java and
In this article, we are going to discuss Multithreading in Java and types. What is the thread Multitasking Process-based Multitasking (Multiprocessing) Thread-based Multitasking (Multithreading) Introduction In java, Multithreading means multiple threads executing simultaneously in a process is called Multithreading. By definition, multitasking is when multiple processes share common processing resources such as a CPU. …. Read More
Inter-thread communication in Java
What is Inter-thread communication? When two threads will communicate with each other is called Inter-thread communication. Two threads will communicate with each other by using wait(), notify(), notifyAll() methods. wait(), notify(), notifyAll() methods are available in Object class, but not in threads class. Because the thread is required to call these methods on any shared …. Read More
Synchronization in Java
Synchronization in Java: Introduction Synchronization in Java is an important concept since Java is a multi-threaded language, It has the capability to control the access of multiple threads to any shared resource. Synchronization in Java is possible by using Java keywords “synchronized”. It is a better option when the requirement is only one thread to …. Read More
String StringBuffer and StringBuilder.
We are going to discuss the difference between String and StringBuffer and StringBuilder. 1.Differences between String and StringBuffer. String: Once we create a string object we can’t perform any changes in the existing object. If we try to perform any changes with those changes a new object will be created. This non-changeable is nothing …. Read More
String in Java
Introduction The string is one of the most widely used classes in java programming by developers. Strings are immutable, so StringBuffer and StringBuilder classes come to make the string mutable (manipulations) easy way. String In Java, a string is an object which represents a sequence of characters. The string is immutable, which means it …. Read More
Access Modifiers in Java.
The access modifiers in Java helps to restrict the scope of a class, constructor, variable, method, or data member. There are four types of access modifiers in java. Default Private Protected Public 1.Default access modifier When we don’t use any access modifier for a class, method, or data member, it is …. Read More
Object Oriented Programming (OOPs) Concept in Java.
Introduction Object-Oriented Programming (OOPs) is the concept of objects based programming, that contains data(fields) and its behavior (method), in a single location(object). So the reason for using object-oriented programming is to increase the flexibility and maintainability of programs. That’s why in object-oriented programming language everything is represented as an object. The main aim of Object-oriented …. Read More
Encapsulation in Java with Examples
Introduction Encapsulation is an OOPS concept. It is a process of wrapping the data (variables) and code together into a single unit. It is a concept of hiding data in a class, from other classes using data hiding. That’s why it is also known as data hiding. What is Encapsulation? It is …. Read More
Inheritance in java
What is Inheritance in java? Inheritance is an important part of Object-Oriented Programming (OOP) languages. Inheritance is a mechanism where one class acquires all the properties and behaviors (methods and fields) of another class is called Inheritance. We use extends Keyword to inherit the properties of one class to another class. Using the extends keyword, …. Read More