- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 9775 Articles for Object Oriented Programming

Updated on 15-May-2023 16:56:42
Runtime Type Identification in short RTTI is a feature that enables retrieval of the type of an object during run time. It is very crucial for polymorphism as in this oops functionality we have to determine which method will get executed. We can also implement it for primitive datatypes like Integers, Doubles and other datatypes. In this article, we will explain the use case of Runtime Type Identification in Java with the help of examples. Program for Runtime Type Identification Let’s discuss a few methods that can help us to identify type of object: instanceOf It is a ... Read More 
Updated on 15-May-2023 16:53:12
LinkedHashMap is a generic class that is used to implement Map Interface. Also, it is a sub class of the HashMap class therefore, it can use all the methods and also perform similar operations that a HashMap class is capable of. Java provides various ways to sort LinkedHashMap, we will learn how to create and sort it by its values using Comparable Interface through this article. Program to sort LinkedHashMap by Values Before jumping to the sorting program directly, let’s take a look at few concepts first − LinkedHashMap As we have discussed earlier the LinkedHashMap class extends ... Read More 
Updated on 15-May-2023 16:49:47
LinkedHashMap is a generic class that is used to implement Map Interface. Also, it is a sub class of the HashMap class therefore, it can use all the methods and also perform similar operations that a HashMap class is capable of. Java provides various ways to sort LinkedHashMap, we will learn how to create and sort it by using its keys through this article. Program to sort LinkedHashMap by Keys Before jumping to the sorting program directly, let’s take a look at few concepts first − LinkedHashMap As we have discussed earlier the LinkedHashMap class extends HashMap class ... Read More 
Updated on 15-May-2023 16:48:29
The full form of JAR is Java Archive File. Java provides this feature to bundle multiple java program files as well as their corresponding class files into one single unit. Perhaps, it is the only file format that can store audio, video, text files and so forth in one place. In this article, we will discuss how we can create and access a JAR file in Java. Java JAR File The need for data compression was felt to store and transmit large amounts of data without any hassle. For this purpose, a ZIP file was introduced that encouraged Java creators ... Read More 
Updated on 15-May-2023 16:45:00
Byte Array can be said as the combination of byte and array. Byte is the smallest integer type and Array is a linear data structure that is used to store groups of elements of similar datatypes. This article will discuss a program to convert Byte Array to Writer in Java. Let’s understand the term Byte Array and Writer first. Byte Array and Writer Class Byte Array It is a type of array that stores a sequence of data of byte datatype. We will use the ‘getBytes()’ method to convert specified strings into sequences of characters and store them in a ... Read More 
Updated on 15-May-2023 16:42:51
While writing codes we all do various mistakes that lead us to errors like overflow errors and syntax errors. Rounding-off error is one of the common errors that may result in a wrong solution for a given mathematical problem. Generally, this error occurs when we work with floating point numbers. In this article, we will explore the reason for this problem and try to find a way to get rid of this kind of error. Rounding off Errors Floating Point Types They are also known as real numbers and are used when the calculation requires fractional values. It represents numbers ... Read More 
Updated on 12-May-2023 17:52:12
In any programming language, variables serve as a container that is used to store values. Before actually using a variable we need to declare it first. We can’t give any random names or symbols to it, although Java provides almost all the letters and symbols available for human and machine use. We will explore the naming conventions and set of rules for variable declaration in Java through this article. Variable Declaration in Java When it comes to declaring a variable, we need to define its type first, then name of the variable and an optional value. We can declare ... Read More 
Updated on 12-May-2023 17:47:24
Swing is a framework of Java that is used to develop window based applications. It provides a rich variety of GUI (Graphical User Interface) components that are lightweight and platform independent. Some of the classes of GUI components are JLable, JButton, JFrame, JCheckBox and so forth. In this article, we will build a simple student grade calculator using the components of Java Swing. Steps to create Student Grade Calculator using Java Swing To develop this application follow these steps − Step 1 Open your Netbeans IDE and create a new Java Application through the following path − File -> ... Read More 
Updated on 12-May-2023 17:45:25
Servlets are small java modules that are used on server side of a web connection to enhance the functionality of web server. All the methods and classes for creating a servlet are available in ‘javax.servlet’ and ‘javax.servlet.http’ packages. Hence, it is important to import them into your program before working with the servlet. In this article, we will develop a simple bill splitter application using Java Servlets. Before starting, make sure you have installed the NetBeans IDE and Apache Tomcat server. Steps to build Simple Bill Splitter To develop this application follow these steps − Step 1 Open your ... Read More 
Updated on 12-May-2023 17:41:53
Separators are one of the building blocks of a Java program that helps us to differentiate the regions of the block of code and arrange groups of codes or statements. They help us in defining scopes of particular variables and methods. Have you ever missed a bracket while defining a method or semicolon at the end of a statement? We all do this silly mistake every time we code. In this article, we are going to explore the importance of these separators and what would be the consequences if we neglect them. Seperators available in Java Being a programmer we ... Read More Advertisements