![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
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 9326 Articles for Object Oriented Programming
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
75 Views
Array is a linear data structure that is used to store group of elements with similar datatypes. We can create an array with primitive datatypes and since a class is considered as user-defined datatype so it is also possible to create array of objects. In this article, we are going to discuss object array and we will create java program to access all data as object array. Object array or Array of Objects Array of objects actually contains reference variables of objects i.e. the elements stored in object array are of reference type. We follow the same syntax to create ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
98 Views
After JDK version 5 java introduces the enumeration. It is a group of constants defined using the keyword ‘enum’. The final variables in java are somewhat similar to enumeration. In this article, we will make a java program in which we define an enum class and try to access all the constant defined in the enum by using valueOf() and values() methods. Enum We use enum class when we need to define a fixed set of constants. For example, if we want to use the days of the week, planet names, names of all five vowels etc. Note that all ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
63 Views
Array is a linear data structure that is used to store group of elements with similar datatypes. It stores data in a sequential manner. Once we create an array we can’t change its size i.e. it is of fixed length. This article will help you to understand the basic concept of array and array bound. Also, we will discuss java program to check array bounds while inputting elements into the array. Array and Array Bound We can access elements of array by its index. Suppose we have an array of length N, then We can ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
94 Views
The static methods are defined using static keywords but to declare instance variables we don’t use static keywords. Generally, we can’t access the instance variable by a static method. In this article, we will create an instance variable and then we will check the accessibility of that instance variable by a static method. Let’s understand static method and instance variable first. Instance Variable In the context of programming language, variables are the name of containers that contain data of any type. We can say it is a storage unit. Syntax to declare a variable Data_Type nameOfvariable = values [optional]; ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
94 Views
The type of nested inner class that has no name is called as anonymous class. Before making a java program to check if a given class is an anonymous class we need to understand the concept of nested class. Let’s discuss this in detail. Nested Class When we create class within another class, it is referred as nested class. The nested classes share the same scope. It allows the grouping of similar classes and it increases the encapsulation (encapsulation means wrapping of similar functionalities in a single unit). In java, we know that a class could not be defined with ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
129 Views
The nested class that is defined inside the body of a method or within a loop like for and if, is called as local inner class. Before making a java program to check whether a given class is a local inner class or not we need to understand the concept of nested class. Let’s discuss this in detail. Nested Class When we create class within another class, it is referred as nested class. The nested classes share the same scope. It allows the grouping of similar classes and it increases the encapsulation (encapsulation means wrapping of similar functionalities in ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
188 Views
Consider the following table for eligibility criteria of different companies − CGPA Eligible Company Greater than or equal to 8 Google, Microsoft, Amazon, Dell, Intel, Wipro Greater than or equal to 7 Tutorials point, accenture, Infosys, Emicon, Rellins Greater than or equal to 6 rtCamp, Cybertech, Skybags, Killer, Raymond Greater than or equal to 5 Patronics, Bata, Nobroker Let’s jump into the java program to check eligibility of tpp students for appearing in interviews. Approach 1: Using if else if condition Generally, we use if else if ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
668 Views
Before making java program to check if JVM is 32 or 64 bit, let’s first discuss about JVM. JVM is java virtual machine that is responsible for executing the byte code. It is a part of Java Runtime Environment (JRE). We all know java is platform independent but the JVM is platform dependent. We need separate JVM for every OS. If we have byte code of any java source code, we can run it on any platform easily because of JVM. The whole process of execution of a java file is as follows − First, we save java ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
957 Views
When the sum of factors of a given number (after discarding the given number) is equal to the number itself is called a perfect number. In this article, we will create java programs to check if a given number is perfect or not. for the given problem we are going to use iterative approaches like for loop and while loop. Let’s try to understand through some examples − Example 1 Given number: 496 Its factors are: 1, 2, 4, 8, 16, 31, 62, 124 and 248 ( we have to exclude 496 ) Sum of the factors are: 1 + ... Read More
![Shriansh Kumar](https://www.tutorialspoint.com/assets/profiles/644826/profile/60_1575483-1682416785.jpg)
182 Views
In java, collection is an object or we can say a container for simplicity that allows us to group several numbers of objects in a single unit. The collection interface is present at the root of all collection framework interfaces. We can perform various operations on collection like adding, removing, iterating, searching and retrieving objects. In this article, we will discuss a java program to add data from the specified collection in the current collection with the help of addAll() and add() method. addAll() − It add data from a specified collection into current collection. Its return type is ... Read More