Category: Java
-
Encapsulation: Access modifiers/Private keyword
Encapsulation: The whole idea behind encapsulation is to hide the implementation details from users. If a data member is private it means it can only be accessed within the same class. No outside class can access private data member (variable) of other class. It is a mechanism of wrapping the data (variables) and code acting…
-
Constructor Overloading
The constructor overloading can be defined as the concept of having more than one constructor with different parameters so that every constructor can perform a different task. Constructor gets called automatically when the object is created . Even though we are not creating constructor there will be a default constructor which is invisible. Based on…
-
Constructor in Java
A constructor in Java is a special method that is used to initialize objects. The constructor is called when an object of a class is created. At the time of calling constructor, memory for the object is allocated in the memory. Every time an object is created using the new() keyword, at least one constructor…
-
Compile time Polymorphism/code reusability
Compile-time polymorphism is also known as static polymorphism or early binding. Compile-time polymorphism is a polymorphism that is resolved during the compilation process. Overloading of methods is called through the reference variable of a class. Compile-time polymorphism is achieved by method overloading and operator overloading. (tbd) Why known as static polymorphism or early binding(tbd) Polymorphism…
-
Method overloading/ Arguments and Parameters
Default value as output for Global variable: Initialization for local varibles: To overcome the above error we have to initialize value for local variable. Local variable does not give default value like global variable. int no3; // declarationno3 = 5; // initialization Arguments: An argument is a value passed to a function when the function(tbd)…
-
Void in Java
The void keyword in Java denotes that a method does not have a return type main() method doesn’t return anything, its return type is void. If you want a method to return a value, you can use a primitive data type (such as int, char, etc.) instead of void and use the return keyword inside…
-
What is Method in Java ?
A method is a collection of statements that perform some specific task and return the result. A method can perform some specific task without returning anything. (Tbd) Methods allow us to reuse the code without retyping the code. Modifier (tbd), Parameter- list(tbd) Create a Method: A method must be declared within a class. It is…
-
Introduction of STLC:
Software testing life cycle is a sequence of different activities performed during the software testing process. STLC is a fundamental part of Software development life cycle(SDLC) but STLC consists of only the testing phases. It is an activity to check whether the actual result matches with the expected result to ensure that the product is…
-
About Static keyword and new keyword
Static keyword: Static keyword belongs to class which includes class specific information. A static method(tbd) is also called a class method and is common across the objects of the class and this method can be accessed using class name as well. A static method can call only other static methods; it cannot call a non-static…
-
In which language Whatsapp is built?
Whatsapp is based on Erlang, a programming language designed for scalable systems with real-time high availability requirements. From the beginning of WhatsApp, Erlang seemed like the perfect fit. Erlang is simple but highly functional and supports automatic memory allocation for improved performance. Also, Erlang is able to detect failures within other processes or other computers.…