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 the need of static method? Explain why main method in java in always static –
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 What is variable size array? Write a program to explain the use of variable size array in java –
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 List the basic data type used in java. Explain with suitable example –
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 Explain the various features of java –
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 the structure of C++ and how is a structure different from a class? Explain with suitable example?
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 What is access control specifier in C++? Explain the difference among private, protected and public access control specifier?
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 Write short notes on the following –
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 multi-threading? Explain the life cycle of multi-threading.
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 What do you mean by friend function and also write down the characteristics of friend function and friend class?
Virtual function: - Polymorphism in biology means ability of an organism to assume a variety of forms. In C++, it indicates the form of a member function that can be changed at run time. Such member function are called virtual member function and the corresponding class is called polymorphic class. The object of the polymorphic … Continue reading What is a virtual function? Why do we need virtual function? When we make virtual function “Pure”. OR how can one achieve run time polymorphism in C++? Explain with suitable example.