├── Practise ├── Main.class ├── Rotateinteger.class ├── Rotateinteger.java ├── boatparty.class ├── boatparty.java ├── condi.class ├── condition.class ├── condition.java ├── d1 │ ├── empdet.java │ └── hextooct.java ├── day │ ├── alp.class │ ├── alp.java │ ├── alprev.class │ ├── alprev.java │ ├── evennum.class │ ├── evennum.java │ ├── fact.class │ ├── fact.java │ ├── oddnum.class │ ├── oddnum.java │ ├── power.class │ ├── power.java │ ├── printnum.java │ ├── reve.java │ ├── reverse.class │ ├── reverse.java │ ├── sum.class │ ├── sum.java │ ├── sumeven.class │ ├── sumeven.java │ ├── sumodd.class │ ├── sumodd.java │ ├── table.class │ ├── table.java │ ├── tablerev.class │ └── tablerev.java ├── duplicate_array.class ├── duplicate_array.java ├── findmissing.java ├── largeandsmall.class ├── largeandsmall.java ├── naturalnum.class ├── naturalnum.java ├── new │ ├── arr2.java │ ├── array.java │ └── hello.java ├── numberBoxpattern.java ├── oddevenlefttriangle.class ├── oddevenlefttriangle.java ├── pattern │ ├── boxpattern.class │ ├── boxpattern.java │ ├── number_triangle.class │ └── number_triangle.java ├── reversesentance.java ├── stringslice.class ├── stringslice.java ├── swapvowles.class └── swapvowles.java ├── README.md ├── Training ├── Hello.class ├── Hello.java ├── q1.class ├── q1.java ├── userip.class ├── userip.java ├── variable.class └── variable.java └── basic ├── Datatypes.txt ├── installization.txt ├── intro.txt ├── list-set.txt ├── oops.txt └── string.txt /Practise/Main.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/Main.class -------------------------------------------------------------------------------- /Practise/Rotateinteger.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/Rotateinteger.class -------------------------------------------------------------------------------- /Practise/Rotateinteger.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Program: Rotate digits 180 degrees 3 | The program must accept an integer N as the input. The program must form an integer X by rotating the each digit 180 degree based on the following conditions. 4 | -> The digits 2 and 5 rotate to each other 5 | -> The digits 6 and 9 rotate to each other 6 | -> For the remaining digits(0,1,3,4,7 and 8), they remain the same. 7 | Finally, the program must print the sum of N and X as the Output. 8 | */ 9 | 10 | import java.util.Scanner; 11 | 12 | public class Rotateinteger { 13 | 14 | public static void main(String[] args) { 15 | Scanner scanner = new Scanner(System.in); 16 | System.out.println("Enter an integer:"); 17 | int n = scanner.nextInt(); 18 | int x = rotateDigits(n); 19 | int sum = n + x; 20 | System.out.println("Rotated number: " + x); 21 | System.out.println("Sum of " + n + " and " + x + ": " + sum); 22 | } 23 | private static int rotateDigits(int n) { 24 | int result = 0; 25 | int digit; 26 | int multiplier = 1; 27 | 28 | while (n > 0) { 29 | digit = n % 10; 30 | switch (digit) { 31 | case 0: 32 | case 1: 33 | case 3: 34 | case 4: 35 | case 7: 36 | case 8: 37 | result = result + digit * multiplier; 38 | break; 39 | case 2: 40 | result = result + 5 * multiplier; 41 | break; 42 | case 5: 43 | result = result + 2 * multiplier; 44 | break; 45 | case 6: 46 | result = result + 9 * multiplier; 47 | break; 48 | case 9: 49 | result = result + 6 * multiplier; 50 | break; 51 | } 52 | multiplier *= 10; 53 | n /= 10; 54 | } 55 | return result; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Practise/boatparty.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/boatparty.class -------------------------------------------------------------------------------- /Practise/boatparty.java: -------------------------------------------------------------------------------- 1 | /*A party has been curise (ship), 2 | the party is organised for limited time - t 3 | the no of guest entering - e(i) and leaving - l(i) 4 | the party at every hour is r4epresented as element of an array 5 | the task is to find the maximum no of hours guest present on the curise at any given instance within t (limited time) hours 6 | 5 7 | 52706 8 | 21301 9 | 348813 10 | op-5 11 | 12 | */ 13 | 14 | 15 | import java.util.Scanner; 16 | 17 | public class boatparty { 18 | public static void main(String[] args) { 19 | Scanner sc = new Scanner(System.in); 20 | 21 | // Read the number of elements 22 | int t = sc.nextInt(); 23 | 24 | // Initialize arrays to store 'e' and 'l' values 25 | int[] e = new int[t]; 26 | int[] l = new int[t]; 27 | 28 | // Read the 'e' array elements 29 | for (int i = 0; i < t; i++) { 30 | e[i] = sc.nextInt(); 31 | } 32 | 33 | // Read the 'l' array elements 34 | for (int i = 0; i < t; i++) { 35 | l[i] = sc.nextInt(); 36 | } 37 | 38 | // Array to store the cumulative values 39 | int[] p = new int[t]; 40 | 41 | // Variable to keep track of the current person count 42 | int person = 0; 43 | 44 | // Calculate the cumulative values 45 | for (int i = 0; i < t; i++) { 46 | person += e[i]; 47 | person -= l[i]; // Assuming 'l' values are to be subtracted 48 | p[i] = person; 49 | } 50 | 51 | // Find the maximum value and the corresponding index 52 | int max = Integer.MIN_VALUE; 53 | int index = 0; 54 | for (int i = 0; i < p.length; i++) { 55 | if (max < p[i]) { 56 | max = p[i]; 57 | index = i; 58 | } 59 | } 60 | 61 | // Output the result (adding 1 to the index as it seems to be required) 62 | System.out.println(index + 1); 63 | 64 | sc.close(); 65 | } 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /Practise/condi.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/condi.class -------------------------------------------------------------------------------- /Practise/condition.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/condition.class -------------------------------------------------------------------------------- /Practise/condition.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | public class condition { 3 | public static void main(String args[]){ 4 | System.out.println("Input kudu \n AI - 10, IT - 20, CSE - "); 5 | Scanner vaangu = new Scanner (System.in); 6 | System.out.print("dept = "); 7 | int a = vaangu.nextInt(); 8 | if(a==10){ 9 | System.out.print("You are AI dept"); 10 | } 11 | else if (a==20) { 12 | System.out.print("You are IT dept"); 13 | 14 | } 15 | else{ 16 | System.out.println("You are CSE"); 17 | } 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Practise/d1/empdet.java: -------------------------------------------------------------------------------- 1 | package d1; 2 | 3 | public class empdet { 4 | public static void main(String args[]){ 5 | String s = "Vanakam da Maapula"; 6 | int length = s.length(); 7 | System.out.println(length); 8 | System.out.println(s.charAt(5)); 9 | System.out.println(s.startsWith("V")); 10 | System.out.println(s.toUpperCase()); 11 | char [] charArray(); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /Practise/d1/hextooct.java: -------------------------------------------------------------------------------- 1 | package d1; 2 | 3 | import java.util.Scanner; 4 | 5 | public class hextooct { 6 | public static void main(String[] args) { 7 | Scanner vaangu = new Scanner(System.in); 8 | int x = vaangu.nextInt(); 9 | System.out.println("Enter the input"); 10 | 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Practise/day/alp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/day/alp.class -------------------------------------------------------------------------------- /Practise/day/alp.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | public class alp { 3 | public static void main (String [] args){ 4 | for(char i ='A';i<='Z';i++){ 5 | System.out.println(i); 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Practise/day/alprev.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/day/alprev.class -------------------------------------------------------------------------------- /Practise/day/alprev.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | public class alprev { 3 | public static void main (String [] args){ 4 | for(char i ='Z';i>='A';i--){ 5 | System.out.println(i); 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Practise/day/evennum.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/day/evennum.class -------------------------------------------------------------------------------- /Practise/day/evennum.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | public class evennum { 3 | public static void main (String [] args){ 4 | Scanner sc = new Scanner (System.in); 5 | int a = sc.nextInt(); 6 | for(int i=0;i<=a;i++){ 7 | if(i%2==0){ 8 | System.out.println(i); 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Practise/day/fact.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/day/fact.class -------------------------------------------------------------------------------- /Practise/day/fact.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | public class fact { 3 | public static void main(String[] args) { 4 | Scanner Sc = new Scanner(System.in); 5 | int a = Sc.nextInt(); 6 | int count = 1; 7 | for(int i=1;i<=a;i++){ 8 | count = count*i; 9 | System.out.println(count); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Practise/day/oddnum.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/day/oddnum.class -------------------------------------------------------------------------------- /Practise/day/oddnum.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | public class oddnum { 3 | public static void main (String [] args){ 4 | Scanner sc = new Scanner (System.in); 5 | int a = sc.nextInt(); 6 | for(int i=0;i<=a;i++){ 7 | if(i%2!=0){ 8 | System.out.println(i); 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Practise/day/power.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/day/power.class -------------------------------------------------------------------------------- /Practise/day/power.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | public class power { 3 | public static void main(String[] args) { 4 | Scanner sc = new Scanner (System.in); 5 | double a = sc.nextDouble(); 6 | double b = sc.nextDouble(); 7 | double c = Math.pow(a, b); 8 | System.out.println(c); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Practise/day/printnum.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | public class printnum { 3 | public static void main (String [] args){ 4 | Scanner sc = new Scanner (System.in); 5 | int a = sc.nextInt(); 6 | for(int i=0;i<=a;i++){ 7 | System.out.println(i); 8 | } 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Practise/day/reve.java: -------------------------------------------------------------------------------- 1 | package day; 2 | 3 | public class reve { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /Practise/day/reverse.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/day/reverse.class -------------------------------------------------------------------------------- /Practise/day/reverse.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | public class reverse { 3 | public static void main (String [] args){ 4 | Scanner sc = new Scanner (System.in); 5 | int a = sc.nextInt(); 6 | for(int i=a;i>=0;i--){ 7 | System.out.println(i); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Practise/day/sum.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/day/sum.class -------------------------------------------------------------------------------- /Practise/day/sum.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | public class sum { 3 | public static void main (String [] args){ 4 | Scanner sc = new Scanner (System.in); 5 | int a = sc.nextInt(); 6 | int count = 0; 7 | for(int i=0;i<=a;i++){ 8 | count = count+i; 9 | System.out.println(count); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Practise/day/sumeven.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/day/sumeven.class -------------------------------------------------------------------------------- /Practise/day/sumeven.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | public class sumeven { 3 | public static void main(String[] args) { 4 | Scanner sc = new Scanner (System.in); 5 | int a = sc.nextInt(); 6 | int count = 0; 7 | for(int i=0;i<=a;i++){ 8 | if(i%2==0){ 9 | count = count + i; 10 | System.out.println(count); 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Practise/day/sumodd.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/day/sumodd.class -------------------------------------------------------------------------------- /Practise/day/sumodd.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | public class sumodd { 3 | public static void main(String[] args) { 4 | Scanner sc = new Scanner (System.in); 5 | int a = sc.nextInt(); 6 | int count = 0; 7 | for(int i=0;i<=a;i++){ 8 | if(i%2!=0){ 9 | count = count + i; 10 | System.out.println(count); 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Practise/day/table.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/day/table.class -------------------------------------------------------------------------------- /Practise/day/table.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | public class table { 3 | public static void main (String [] args){ 4 | Scanner sc = new Scanner (System.in); 5 | int a = sc.nextInt(); 6 | int j = sc.nextInt(); 7 | for(int i=1;i<=a;i++){ 8 | System.out.println(i + "*" + j + "=" + i*j); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Practise/day/tablerev.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/day/tablerev.class -------------------------------------------------------------------------------- /Practise/day/tablerev.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | public class tablerev { 3 | public static void main (String [] args){ 4 | Scanner sc = new Scanner (System.in); 5 | int a = sc.nextInt(); 6 | int j = sc.nextInt(); 7 | for(int i=a;i>=1;i--){ 8 | System.out.println(i + "*" + j + "=" + i*j); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Practise/duplicate_array.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/duplicate_array.class -------------------------------------------------------------------------------- /Practise/duplicate_array.java: -------------------------------------------------------------------------------- 1 | /*remove duplicate 1234 2 | *print duplicate 2 3 | *no of duplicate 2 4 | *without duplicate 134 5 | 6 | *12234*/ 7 | 8 | 9 | //package Java; 10 | import java.util.*; 11 | 12 | public class duplicate_array { 13 | public static void main(String[] args) { 14 | Scanner sc = new Scanner(System.in); 15 | int n = sc.nextInt(); 16 | int[] arr = new int[n]; 17 | int[] freq = new int[50]; 18 | 19 | for (int i = 0; i < n; i++) { 20 | arr[i] = sc.nextInt(); 21 | } 22 | 23 | for (int i = 0; i < n; i++) { 24 | int num = arr[i]; 25 | int count = 1; 26 | 27 | for (int j = i + 1; j < n; j++) { 28 | if (num == arr[j]) { 29 | count++; 30 | freq[j] = -1; 31 | } 32 | } 33 | 34 | if (freq[i] != -1) { 35 | freq[i] = count; 36 | } 37 | } 38 | 39 | int dup = 0; 40 | for (int i = 0; i < freq.length; i++) { 41 | if (freq[i] == 1) { 42 | //dup++; 43 | System.out.println(arr[i]); 44 | } 45 | } 46 | //System.out.println(dup); 47 | } 48 | } -------------------------------------------------------------------------------- /Practise/findmissing.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 5 Apple basket iruku 3 | * 1 remove pannitanga 4 | * find the how many number of apple 5 | * n=5 6 | * 2 4 6 10 12 7 | * o/p - 8 8 | */ 9 | 10 | public class findmissing { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Practise/largeandsmall.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/largeandsmall.class -------------------------------------------------------------------------------- /Practise/largeandsmall.java: -------------------------------------------------------------------------------- 1 | /*Enter a sentence: 2 | artificial intelligence and data science 3 | Largest word: intelligence 4 | Smallest word: and*/ 5 | 6 | 7 | import java.util.Scanner; 8 | public class largeandsmall { 9 | 10 | public static void main(String[] args) { 11 | Scanner sc = new Scanner(System.in); 12 | 13 | // Read the entire sentence 14 | System.out.println("Enter a sentence:"); 15 | String sentence = sc.nextLine(); 16 | 17 | // Split the sentence into words 18 | String[] words = sentence.split("\\s+"); 19 | 20 | // Initialize variables to track the largest and smallest words 21 | String largestWord = words[0]; 22 | String smallestWord = words[0]; 23 | 24 | // Iterate through the words to find the largest and smallest 25 | for (String word : words) { 26 | if (word.length() > largestWord.length()) { 27 | largestWord = word; 28 | } 29 | if (word.length() < smallestWord.length()) { 30 | smallestWord = word; 31 | } 32 | } 33 | 34 | // Output the results 35 | System.out.println("Largest word: " + largestWord); 36 | System.out.println("Smallest word: " + smallestWord); 37 | 38 | sc.close(); 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /Practise/naturalnum.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/naturalnum.class -------------------------------------------------------------------------------- /Practise/naturalnum.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | class naturalnum{ 3 | public static void main (String [] args){ 4 | Scanner sc = new Scanner (System.in); 5 | int a = sc.nextInt(); 6 | for(int i=0;i<=a;i++){ 7 | System.out.println(i); 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /Practise/new/arr2.java: -------------------------------------------------------------------------------- 1 | 2 | import java.util.*; 3 | class arr2 { 4 | public static void main(String[] args) { 5 | Scanner sc=new Scanner(System.in); 6 | int size=sc.nextInt(); 7 | int[][] arr=new int[size][]; 8 | int i,j; 9 | for(i=0; imax){ 20 | max=sum; 21 | ans=i; 22 | } 23 | } 24 | System.out.println(max+" "+ans); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Practise/numberBoxpattern.java: -------------------------------------------------------------------------------- 1 | /*1 1 1 1 1 1 1 1 1 2 | 1 2 2 2 2 2 2 2 1 3 | 1 2 3 3 3 3 3 2 1 4 | 1 2 3 4 4 4 3 2 1 5 | 1 2 3 4 5 4 3 2 1 6 | 1 2 3 4 4 4 3 2 1 7 | 1 2 3 3 3 3 3 2 1 8 | 1 2 2 2 2 2 2 2 1 9 | 1 1 1 1 1 1 1 1 1*/ 10 | 11 | -------------------------------------------------------------------------------- /Practise/oddevenlefttriangle.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/oddevenlefttriangle.class -------------------------------------------------------------------------------- /Practise/oddevenlefttriangle.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | public class oddevenlefttriangle { 4 | public static void main(String[] args) 5 | { 6 | Scanner kadavul = new Scanner(System.in); 7 | int column = kadavul.nextInt(); 8 | int s = 1; 9 | for(int i=1;i<=column;i++) 10 | { 11 | for(int j=1;j<=i;j++) 12 | { 13 | System.out.print(s+" "); 14 | s+=2; 15 | 16 | } 17 | s--; 18 | System.out.println("\n "); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Practise/pattern/boxpattern.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/pattern/boxpattern.class -------------------------------------------------------------------------------- /Practise/pattern/boxpattern.java: -------------------------------------------------------------------------------- 1 | package pattern; 2 | import java.util.* ;/** 3 | * Innerboxpattern 4 | */ 5 | public class boxpattern{ 6 | public static void main(String args[]){ 7 | Scanner kadavulu = new Scanner(System.in); 8 | int ajithu = kadavulu.nextInt(); 9 | for(int i = 0; i='A' && ch[i] <= 'z') && (ch[i]>='a' && ch[i]<='z')) 9 | { 10 | i++; 11 | } 12 | while(!(ch[j]>='A' && ch[j] <= 'z') && (ch[j]>='a' && ch[j]<='z')) 13 | { 14 | j--; 15 | } 16 | char temp = ch[i]; 17 | ch[i] = ch[j]; 18 | } 19 | System.out.println(s); 20 | } 21 | }*/ 22 | -------------------------------------------------------------------------------- /Practise/stringslice.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/stringslice.class -------------------------------------------------------------------------------- /Practise/stringslice.java: -------------------------------------------------------------------------------- 1 | /**input = book 2 | output = true 3 | input = textbook 4 | output = false 5 | Split the string into two and find the count of vowles if it is equal then true else false 6 | import java.util.Scanner; 7 | 8 | public class VowelCounter { 9 | public static void main(String[] args) { 10 | Scanner sc = new Scanner(System.in); 11 | 12 | System.out.print("Enter a string: "); 13 | String s = sc.next(); 14 | 15 | int count = 0, count1 = 0; 16 | int n = s.length(); 17 | 18 | // Convert string to character array 19 | char[] ch = s.toCharArray(); 20 | 21 | // Count vowels in the first half 22 | for(int i = 0; i < n / 2; i++) { 23 | if(ch[i] == 'a' || ch[i] == 'e' || ch[i] == 'i' || ch[i] == 'o' || ch[i] == 'u' || 24 | ch[i] == 'A' || ch[i] == 'E' || ch[i] == 'I' || ch[i] == 'O' || ch[i] == 'U') { 25 | count++; 26 | } 27 | } 28 | 29 | // Count vowels in the second half 30 | for(int i = n / 2; i < n; i++) { 31 | if(ch[i] == 'a' || ch[i] == 'e' || ch[i] == 'i' || ch[i] == 'o' || ch[i] == 'u' || 32 | ch[i] == 'A' || ch[i] == 'E' || ch[i] == 'I' || ch[i] == 'O' || ch[i] == 'U') { 33 | count1++; 34 | } 35 | } 36 | 37 | // Print result 38 | System.out.println(count == count1); 39 | 40 | // Close the scanner 41 | sc.close(); 42 | } 43 | } 44 | 45 | 46 | */ 47 | 48 | public class stringslice { 49 | public static void main(String[] args) { 50 | String word = "book"; 51 | int len = word.length(); 52 | 53 | if (len % 2 != 0) { 54 | System.out.println("false"); 55 | return; 56 | } 57 | 58 | int mid = len / 2; 59 | int firstHalfVowels = 0, secondHalfVowels = 0; 60 | 61 | for (int i = 0; i < len; i++) { 62 | char c = word.charAt(i); 63 | if (isVowel(c)) { 64 | if (i < mid) 65 | firstHalfVowels++; 66 | else 67 | secondHalfVowels++; 68 | } 69 | } 70 | 71 | if (firstHalfVowels == secondHalfVowels) { 72 | System.out.println("true"); 73 | } else { 74 | System.out.println("false"); 75 | } 76 | } 77 | 78 | public static boolean isVowel(char c) { 79 | c = Character.toLowerCase(c); 80 | return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u'; 81 | } 82 | } 83 | 84 | 85 | -------------------------------------------------------------------------------- /Practise/swapvowles.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Practise/swapvowles.class -------------------------------------------------------------------------------- /Practise/swapvowles.java: -------------------------------------------------------------------------------- 1 | /* 2 | * swap the vowoles in given string 3 | * i/p - zoho corporation 4 | * o/p - zohi carporotoon 5 | */ 6 | 7 | import java.util.Scanner; 8 | 9 | public class swapvowles { 10 | public static void main(String[] args) { 11 | Scanner sc = new Scanner(System.in); 12 | System.out.println("Enter a string:"); 13 | String s = sc.nextLine(); 14 | char[] ch = s.toCharArray(); 15 | String vowels = "aeiouAEIOU"; 16 | int i = 0, j = ch.length - 1; 17 | while (i < j) { 18 | while (i < j && vowels.indexOf(ch[i]) == -1) { 19 | i++; 20 | } 21 | while (i < j && vowels.indexOf(ch[j]) == -1) { 22 | j--; 23 | } 24 | if (i < j) { 25 | char temp = ch[i]; 26 | ch[i] = ch[j]; 27 | ch[j] = temp; 28 | i++; 29 | j--;}} 30 | System.out.println("Output string with vowels swapped:"); 31 | System.out.println(String.valueOf(ch)); 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Java_codings -------------------------------------------------------------------------------- /Training/Hello.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Training/Hello.class -------------------------------------------------------------------------------- /Training/Hello.java: -------------------------------------------------------------------------------- 1 | class Hello{ 2 | public static void main(String[] args) 3 | { 4 | System.out.println("Vanakam Bro"); 5 | } 6 | } -------------------------------------------------------------------------------- /Training/q1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Training/q1.class -------------------------------------------------------------------------------- /Training/q1.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | public class q1 { 4 | public static void main(String[] args) 5 | { 6 | Scanner kadavul = new Scanner(System.in); 7 | String y = kadavul.nextLine(); 8 | int x = kadavul.nextInt(); 9 | kadavul.nextLine(); 10 | String z = kadavul.nextLine(); 11 | System.out.println("My name is "+y); 12 | System.out.println("My age is "+x); 13 | System.out.println("I am from "+z); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Training/userip.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Training/userip.class -------------------------------------------------------------------------------- /Training/userip.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | public class userip { 4 | public static void main(String[] args) 5 | { 6 | Scanner kadavul = new Scanner(System.in); 7 | int x = kadavul.nextInt(); 8 | int y = kadavul.nextInt(); 9 | String z = kadavul.nextLine(); 10 | String a = kadavul.nextLine(); 11 | System.out.print(x+y); 12 | System.out.print(z+a); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Training/variable.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dhilipkumar13/Java_codings/d16d8eb9d846668efacedb6c621586a99eb6227f/Training/variable.class -------------------------------------------------------------------------------- /Training/variable.java: -------------------------------------------------------------------------------- 1 | public class variable { 2 | public static void main(String[] args) 3 | { 4 | int x = 67; 5 | String c = "Kadavul"; 6 | System.out.println(x); 7 | System.out.println(c); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /basic/Datatypes.txt: -------------------------------------------------------------------------------- 1 | syntax 2 | ------- 3 | datatype var_name; 4 | int a = 20+5; 5 | 6 | age -- variable name 7 | 20 -- value 8 | + -- assignment operater 9 | 10 | Datatype -------------------------------------------------------------------------------- /basic/installization.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Installation 4 | =============== 5 | How to install JDK: 6 | 1) GO to google------>type jdk 1.11 download------->Click the first link 7 | 2) www.oracle.com-----------> Java SE development Kit 11.0.21 8 | 3) check for os type and system processor type 9 | 4) click the link which suits for your system---->jdk-11.0.21_window-x64_bin 10 | 5) click Download----->it will reducing to a page for Account creation 11 | 6) create Account ----> you will get a email for validation. 12 | 7) Start downloading the file. 13 | 8) install in your System. 14 | 15 | 16 | IDE 17 | ======= 18 | Integrated development environment 19 | 20 | eclips------> Opensource (95% industrial Usage) 21 | RAD -----> IBM 22 | jDeveloper ---> oracle. 23 | 24 | How to install Eclips 25 | =================================== 26 | 1) go to Google-------------->Eclips download 27 | 2) www.eclipse.com 28 | 3) Choose----------->Install your favorite desktop IDE packages-> Download packages 29 | 4) Choose -->Eclipse IDE for Eclipse Committers 30 | 5) check for os type and processor type 31 | 6) click the link ---->Download in the form of ZIP file 32 | 7) rid=ght click on your ZIP file -----------> 33 | 8) Extract the file And application file 34 | 9) Install 35 | 36 | JDK--a Kit provides the environment to develop and execute(run) java program 37 | jre--provide an environment to run code 38 | jvm--responsible for executing the java program line by line 39 | 40 | -------------------------------------------------------------------------------- /basic/intro.txt: -------------------------------------------------------------------------------- 1 | JAVA 2 | ----- 3 | It's a Programming Lang. 4 | It is used to create a web application, desktop application. 5 | ============================================================ 6 | It is platform independent(Windows, Linix and mac) 7 | It is a open source(No need to pay for licence) 8 | ============================================================ 9 | JDK 10 | --- 11 | JDK = JRE + JVM 12 | ============================================================ 13 | 14 | 15 | 16 | 17 | ============================================================ 18 | 19 | JAVA 20 | ============ 21 | -> programming language 22 | -> it is used to create a webapplication,desktop application,Mobile appliacation 23 | example: 24 | BASIC,FORTRAN,C,C++,JAVA,RUBY,PEARL,PYTHON,.. 25 | 26 | 27 | C/C++ 28 | ================ 29 | -> it is a platform dependent.(itunes-->ios) 30 | -> it does not support muliple application at a time.(button phone) 31 | 32 | JAVA MAIN FEATURES 33 | ================ 34 | -> it is platform independent(Windows,linex,mac,etc,..) 35 | -> it is an open source(no need to pay for licence) 36 | -> it is simple progrming language(syntax) 37 | -> it is easy to run and debug --(line by line execution)(bytecode ----> machinecode(0,1)) 38 | -> it does multithreading(thread-->process) 39 | Muliple process 40 | browse -->hear audio 41 | it is portable(JVM) 42 | WORA -- write Once Run Anywhere 43 | it is more secure 44 | 45 | Encrypt Decrypt 46 | 47 | Hello -------->dfghj--------------->Hello 48 | 49 | JDK 50 | =========== 51 | -> JAVA DEVELOPMENT KIT 52 | -> JDK=JRE+JVM 53 | 54 | JRE 55 | ======== 56 | -> JAVA RUNTIME ENVIRONMENT 57 | -> It is contain predefined file and libraries 58 | 37+21=58 -------------------------------------------------------------------------------- /basic/list-set.txt: -------------------------------------------------------------------------------- 1 | List is a predefine interface, 2 | methods in List 3 | =============== 4 | add() 5 | Slice() 6 | get(Index) 7 | add(index, value) 8 | remove(index) 9 | set(index,value) 10 | indexOf(value) 11 | contain(value) 12 | addAll() 13 | rateinAll() 14 | removeAll() 15 | ================ 16 | 17 | Sets 18 | ====== 19 | Set is predefine interface which is present in the java.util package 20 | set is value based one 21 | set does not allow duplicate value 22 | Order of the set is based on class which is implemented 23 | 24 | Types of set (or) Classes of set 25 | ================================= 26 | Hashset----random 27 | LinkedHashset----insertion 28 | TreeSet----ascending Order 29 | -------------------------------------------------------------------------------- /basic/oops.txt: -------------------------------------------------------------------------------- 1 | OOPS 2 | =========== 3 | -> oops stands for Object Orinented Programming Structure. 4 | -> it is a method of implementation in which is organized as collection of class method and object 5 | 6 | Inhertiance 7 | polymorphism 8 | Abstraction 9 | Encapsulation 10 | 11 | 12 | Create --> Class,Method and Object 13 | 14 | How to write a program 15 | ================= 16 | ->Project---->package----->Class---->method---->Object 17 | 18 | Coding Stands or Stands Notation 19 | ================================ 20 | 1. Pascal Notation 21 | ================================ 22 | Each word's first letter should be in capital. 23 | 24 | where to use :- ProjectName,ClassName. 25 | 26 | eg.ZohoCorporation 27 | 28 | 2. Camel Notation 29 | ============================== 30 | -------------------------------------------------------------------------------- /basic/string.txt: -------------------------------------------------------------------------------- 1 | Collection of character or woeds with double quotes is called as String. 2 | String is a Predefined class 3 | It is presented on lava.lang package 4 | 5 | 6 | String method 7 | ============== 8 | length() 9 | charAt() 10 | --------------------------------------------------------------------------------