排序
binary search,linear search
binary search,linear search,Java Program for Linear Search In the world of computer science, searching algorithms are fundamental techniques for retrieving information from data st...
While Loop Basics
While Loop Basics,package hlo; public class While { public static void main(String[]args) { int no=2; //0 //2 //5 ----------> while(no<=5) { 'From 2 to 5, inclusive, anything...
Bubble Sort,Selection Sort
Bubble Sort,Selection Sort,Bubble Sort Algorithm Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in the wrong orde...
swapping in array
swapping in array,Java Program to Swap Two Numbers Problem Statement: Given two integers m and n. The goal is simply to swap their values in the memory block and write the java cod...
array mark ,equal mark,small mark,highest mark, second highest mark
array mark ,equal mark,small mark,highest mark, second highest mark,Program 1: package afterfeb13; public class secondgreater { public static void main(String[] args) { int[] mark ...
Scanner
Scanner,The Scanner class is used to get user input, and it is found in the java.util package. To use the Scanner class, create an object of the class and use any of the available ...
calculator using scanner class
calculator using scanner class,package afterfeb13; import java.util.Scanner; public class calculator { static int c = 0; public static void main(String[] args) { Scanner sc = new S...
Java User Input (Scanner)
Java User Input (Scanner),Java User Input The Scanner class is used to get user input, and it is found in the java.util package. To use the Scanner class, create an object of the c...
Recursion in Java
Recursion in Java,Recursion in Java In Java, Recursion is a process in which a function calls itself directly or indirectly is called recursion and the corresponding function is ca...
For loop-Numbers pattern printing
For loop-Numbers pattern printing, Example Program1: package Forloop; public class Pattern { public static void main(String[] args) { pattern(); pattern1(); pattern2(); pattern3();...
forloop-pattern for num 1 2 3 4 5 6 7 8 9 & star pattern
forloop-pattern for num 1 2 3 4 5 6 7 8 9 & star pattern, program:1 package afterfeb13; public class patternfornumber { public static void main(String[] args) { // number1(); // nu...
For loop – Alphabet pattern printing
For loop - Alphabet pattern printing, Program 1: package Forloop; public class PatternV { public static void main(String[] args) { patternV(); } private static void patternV() { fo...