java

Copy Constructor in Java

Copy Constructor in Java is the constructor that can be use to copy the value of an existing object to a new object. It means the new object will call the copy constructor for copying the value of an existing object. The copy constructor has a special parameter through which it can pass the reference of an existing object for the new object.

java

Access Modifiers in Java

In this tutorial, we will learn about the Access Modifiers in Java, or its types, and how to use them with the help of examples. This modifier specifies the scope of a field, method, constructor, or class. We can change access level of field, constructor, method, and class by applying the access modifier on it.

java

OOPs in Java

OOPs in Java stands for Object Oriented Programming System. It is a Procedural programming is about writing procedures or methods that perform operations on the data, while object-oriented programming is about creating objects that contain both data and methods.

java

Command Line Arguments in Java

Command line arguments means to pass or input value as arguments from command prompt to java program for specific purposes. Using command line arguments we can make java program as command. In other words we can say that it is way to input the value for the program before executing it.
When we use java program as command line argument then the arguments written on command prompt can be receive by class’s main() function during run-time as:–

java

Scanner Class in Java

This is pre-defined class provided by java language version 5 and later. This class is useful to input the different types of values. This scanner class does not work individually, but it contains system.in which is used for standard input. It is provided under java.util package.

java

Array in Java

Array in Java is the collection of similar type data values. In java, array treat as an object. To declare an array, define the variable type with square brackets. Variables in the array are order, and each has an index beginning from 0. The size of an array must be specified by int or short value and not long value.