Category: Java
-
Multi Dimensional Array
A multidimensional array is an array of arrays. Each element of a multidimensional array is an array itself. Multidimensional array represents Two Dimensional Array Three Dimensional Array. Two Dimensional Array: In Two Dimensional Array the data stored in row and columns, and we can access the record using both the row index and column index.…
-
WRAPPER Class
Primitive & non primitive: All classes are non primitive. All user defined classes are non primitive. All non primitive are not user defined. Eg: String, Scanner are not user-defined non primitive is dynamic size– ‘n’ number primitive is fixed size –8 Wrapper class: The wrapper class in Java provides the mechanism to convert primitive into…
-
COLLECTIONS FRAMEWORK Introduction
COLLECTIONS: Collection is an object that represents a groups of objects. The Java collections framework provides a set of interfaces and classes to implement various data structures and algorithms. Collection is a heterogeneous. It helps to overcome the disadvantages in array. Some disadvantages of array: Occupies continuous memory. Unused memory is wasted.Data manipulation is bit…
-
SORTING
Bubble Sorting: Bubble sort algorithm is known as the simplest sorting algorithm. It works by repeatedly swapping the adjacent elements if they are in the wrong order. Sorting an Array in DESCENDING ORDER In the above given explanation For loop is being repeated for 3 times which can be in single loop by initializing new…
-
Arrays in Java
An array is a collection of similar type of elements which has memory location. Java array is an object which contains elements of a similar data type. Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each value. It is a data structure(tbd) where we store similar…
-
Loops in java -While/for/do While
Loops: In programming, Loops are used to repeat a block of code. It allows a set of instructions to be executed repeatedly until a certain condition is fulfilled. Loops are handy because they save time, reduce errors, and they make code more readable. There are three types of for loops in Java. for loop while…
-
Task-Programs
Print natural numbers: Print Even numbers: 3 times table series 4 times table series Puzzle 1 Square root Cube root Pattern Programs: program 1: Output: program 2: reverse the given number pattern 3: program 4: program 5:
-
GitHub
How to install Github ? Open terminal –>type –> sudo apt install git—>enter your laptop password–> git will be installed What is GitHub? GitHub is a website and cloud-based service that helps developers store and manage their code, as well as track and control changes to their code. To understand exactly what GitHub is, you…
-
Scanner/While loop with scanner
The Scanner class is used to get user input, and it is found in the java.util package. getting input from user during run time. java consider the inputs as token—->(datatypes) Scanner is a existing class To reuse the Existing class we should know: The package name of that class to import. Class name About the…