What is the need of static method? Explain why main method in java in always static –

Answer: - The methods that are declared with keyword static called static methods. Since these static methods are offend referred to as class method in order to distinguish them from there counterpart, instance method. Since method are used when we want to have a variable common to all instance of a class. One of the... Continue Reading →


What is variable size array? Write a program to explain the use of variable size array in java –

Answer: - An array is used in java programming to store large amount of data in one variable with different index or subscript. The availability to use single name to represent a collection of item and to refer to an item by specifying the item number enables us to develop concise and efficient program. For... Continue Reading →

List the basic data type used in java. Explain with suitable example –

Data type: - Every variable in a java has a data type. Data types specify the size and type of values that can be stored. Java language is rich in its data type. The variety of data types available allow the programmer to select the type appropriate to needs of application. Basic data type of... Continue Reading →

Explain the various features of java –

Answer: - Java offers number of features in its source programming. This language wanted the language to be not only reliable, portable and distributed but also simple, compact and interactive. Its most important features are compiled and interpreted, platform independent and portable, object oriented, robust and secure, distributed, familiar, simple and small, multi-threaded and interactive,... Continue Reading →

What is the structure of C++ and how is a structure different from a class? Explain with suitable example?

Answer: - A structure is a collection of one or more variables called data members of different data types, grouped together under a single name and new custom data type is formed and is called abstract data type (ABT). The individual variables are called member or data member. By using structure, we can make a... Continue Reading →

What is access control specifier in C++? Explain the difference among private, protected and public access control specifier?

Class specifier: - A C++ provide support for defining classes, which is a significant feature that makes C++ and object oriented language in C term, a class is a natural evolution a structure. Classes contents not only data but also function. The function are called member function and define the set of operation that can... Continue Reading →

Write short notes on the following –

Constructor: - A constructor is a special member function whose main function is to allocate the required resources such as memory and initialize the object of its class. A constructor is distinct from other member function of the class, and it has the same name as its class. It is executed automatically when a class... Continue Reading →

What do you mean by multi-threading? Explain the life cycle of multi-threading.

Multi-threading: - Multi threading is a conceptual programming paradigm where a program or process is divided into two or more sub programs or process, which can be implemented at the same time in parallel. For example, one sub program can display an animation on the screen while another may have built the next animation to... Continue Reading →

What do you mean by friend function and also write down the characteristics of friend function and friend class?

Friend function: - The concept of encapsulation and data hiding detect that non-member function should not be allowed to access an object private and protected members the policy is, if we are not a member, we cannot gate it. Sometimes, this feature leads to considerable inconvenience in programming. Imaging that the user wants a function... Continue Reading →

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: