
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 9150 Articles for Object Oriented Programming

593 Views
In this segment of Java programming, we are going to learn and discover certain programs by which we can represent linear equations in Matrix form. To do these programs, we first have to learn about linear equations and Matrix forms, their types, and how they are solved by simple mathematical methods. We will learn how to integrate a scanner class of java.util package to take input from the user using Java build code. The array will initialize to store some variables as input for the problem matrix. Then, it will be converted into a loop by which the problem equation will ... Read More
5K+ Views
In Java, a method is a block of code that performs a specific task. Methods can take zero or more parameters and can also return a value. When a method returns a value, we call it a method with a return type. A method without parameters but with a return type is a method that does not take any parameters but returns a value. This type of method is useful when we need to perform a specific task that does not require any input parameters, but we need to get a result from that task. First, let us get acquainted ... Read More
465 Views
First, let us get acquainted with the syntax, and examples, and then finally the implementation. The methods in Java are of great importance since it allows reusability of the same code, reducing the number of statements to be written within the code. There are three main parts of the method in order to make it executable. Declaration of the method. Definition of the method. Invoking the method. Method invoking is the last step, while the other two can be interchanged. The only thing to be kept in mind here is, the method must be declared before invoking it. ... Read More
2K+ Views
A method without a return type is termed a void method since it returns nothing. This method can accept multiple parameters. In this tutorial, we will implement Java programs illustrating a method with two parameters and without return type. First of all, we are going to get acquainted with the syntax, examples, and, finally implementation. Syntax public static void method_name (int parameter1, int parameter2) Here, public − It is the access specifier specifying who can access this method. static − It is mandatory to make the method static to avoid errors. void − it denotes that this method returns ... Read More
1K+ Views
In this article, we will learn to handle Unchecked Exception in Java. Exceptions are the unexpected circumstances occurring during the implementation of the program i.e., at the run time, that interrupt the usual working of the program. It can occur due to various reasons such as Illegal input given by the user, Failure of the devices, Loss of network connection, Physical limitations, Code faults, trying to open an unavailable file, etc. There are two major categories of Exceptions − Checked Exception ... Read More

10K+ Views
Exceptions are the unusual events which disrupt the normal flow of execution of a program. When an exception occurs an object called exception object is generated, which contains details of exception like name, description, state of program. In this section, we are going to write a java program to handle divide by zero exception and how to handle multiple exceptions. Types of Exceptions− There are three types of exceptions − Checked exception − Checked exceptions are compile time exceptions i.e, they are checked during compilation of program.These cannot be ignored and must be handled by the programmer. ... Read More

4K+ Views
In this article, we are going to write a java program to find the sum of first n Odd and Even numbers. A number can be divided into two categories based on whether when it is divided by ‘2’ gives remainder ‘0’ or ‘1’. Odd numbers are the numbers which cannot be divided by ‘2’ or these numbers give remainder as 1 when they are divided by ‘2’. In other terms which can be written in the form of ‘2n+1’and Even numbers are numbers which can be divided by 2 i.e., these numbers give remainder as 0 when they are ... Read More

4K+ Views
In our day to day life, there is a huge data being generated in this real world. Among the information generated, Dates are generally used for various things such as scheduling an appointment, planning for day-to-day activities. While working with dates in programming, extracting the year from a specific date can be a common task. We can extract the Year from a particular Date using different in-built functions in Java programming language. In this article we will be discussing different approaches for extracting year from a particular date. Example Input: "13-07-2000" Output: 2000 Example Input: "1997/07/13" Output: 1997 ... Read More

861 Views
A group of files combined stored at a common location is known as a “Directory”. A directory not only contains a group of files but also it can contain a group of other directories as well. A directory is also known as a “Folder”. Directories are a fundamental component of file systems and are used by different operating systems to provide a logical organization of files and to help us perform file management tasks such as searching, sorting, and moving files. In this section, we are going to write a Java program to get the size of a directory. What is ... Read More

9K+ Views
Introduction In Java, a list is an ordered collection of elements that allows duplicates. Sometimes, we may need to combine two lists into one list. Concatenating two lists means joining the elements of the two lists to form a new list containing all the elements of both lists. There are various ways to concatenate two lists in Java, including using loops, streams, and built-in methods. In this context, we will explore different approaches to concatenate two lists in Java. One approach is to use the addAll() method provided by the List interface. This method adds all the elements of one ... Read More