Lowercase to Uppercase, Length of Array, Character count

Lowercase to Uppercase, Length of Array, Character count
import java.util.Arrays;public class Main{     public static void main(String []args){        char c1='s';        String str1="rock";        char[] str2= {'s', 't', 'a', 'r'}; ...

1. Max and min, 2. sum and avg, 3. search for an element, 4. move the min to the beginning

1. Max and min, 2. sum and avg, 3. search for an element, 4. move the min to the beginning
 1. Max and min, 2. sum and avg, 3. search for an element, 4. move the min to the beginningMax= 20 Min= 2                                                   Sum= 39 Avg= 7.8                                                 Please Enter any value:                                          89                                                               [10, 2, 20, 3, 4]                                                [2, 10, 20, 3, 4] import...

Arrays

Arrays
import java.util.Scanner;import java.util.Arrays;public class Main{ public static void main(String[] args) {        int x[] = new int [10];                int[] y;       ...

charAt, indexOf, substring, equals

charAt, indexOf, substring, equals
&nb...

Triangle Star

Triangle Star
 ******import java.util.Scanner;public class Main{ public static void main(String[] args) {        for(int i=1; i<=3; i++){            for(int j=1; j<=i;j++){         ...

Switch Case Weekdays

Switch Case Weekdays
import java.util.Scanner;public class Main{ public static void main(String[] args) {     Scanner scn = new Scanner(System.in);     System.out.print("Please enter any number: ");     int num = scn.nextInt();    ...

1+2+3+.....+10=55

1+2+3+.....+10=55
 public class Main{ public static void main(String[] args) {     int sum=0;     for(int i=1; i <= 10; i++) {         sum=sum+i;     }     System.out.println("Sum= "+ sum); }}Output:...