Category: JAVA
-
MVC Architecture
Model-View-Controller (MVC): The Model-View-Controller (MVC) framework is an architectural/design pattern that separates an application into three main logical components Model, View, and Controller. Each architectural component is built to handle specific development aspects of an application. Model: It is known as the lowest level which means it is responsible for maintaining data. Handle data logically so it basically deals with…
-
Multithreading
Multithreading in Java: Multithreading refers to a process of executing two or more threads simultaneously for maximum utilization of the CPU. A thread in Java is a lightweight process requiring fewer resources to create and share the process resources. Multithreading and Multiprocessing are used for multitasking in Java, but we prefer multithreading over multiprocessing. This is because…
-
String
What is a Java string? A Java string is a sequence of characters that exists as an object of the class java.lang. Java strings are created and manipulated through the string class. Once created, a string is immutable — its value cannot be changed. A string is sequence of characters. A class is a user-defined template for creating an object. A…
-
Lambda Expression
What is a Java Lambda Expression? Java Lambda Expressions are particular code segments that behave like a regular method. They are designed to accept a set of parameters as input and return a value as an output. Unlike methods, a Lambda Expression does not mandatorily require a specific name. Why Do We Need a Lambda…
-
Set,hashset,linkedhashset,treeset
Set: The set interface is present in java.util package and extends the Collection interface. It is an unordered collection of objects in which duplicate values cannot be stored. It is an interface that implements the mathematical set. This interface contains the methods inherited from the Collection interface and adds a feature that restricts the insertion of the duplicate…
-
public static void main(String[] args) – Java main method
In Java programs, the point from where the program starts its execution or simply the entry point of Java programs is the main() method. Why is the main method so important? The Java compiler or JVM looks for the main method when it starts executing a Java program. The signature of the main method needs to be in a specific…
-
System.out.println() in Java
What Is System Out Println in Java? To define System.out.println() in Java, it is a simple statement that prints any argument you pass and adds a new line after it. (System.out.println is a Java statement that prints the argument passed, into the System.out which is generally stdout. System is a class in the java.lang package . The out is…
-
Array and it types
Array: An array in Java is a group of like-typed variables referred to by a common name.To declare an array, define the variable type with square brackets . Following are some important points about Java arrays. An array can contain primitives (int, char, etc.) and object (or non-primitive) references of a class depending on the definition of…