Java Hyd Team
746 subscribers
986 photos
39 videos
670 files
690 links
https://teamhydteam.my.canva.site/

Can visit us on our website 😊
Still working on it 😊
Download Telegram
It will be appearing like this in your calendar please check 30 minutes prior you will receive the notification to join on time
We will explain you the real time implementation and concepts why
Next Sunday we will be working on professional programming
Link will be same to join on next Sunday also
CAN JOIN NOW
CHECK YOUR GOOGLE CALENDER AND EMAIL FOR OINING LINK
ONTIME IS LATE SO PLEASE DON'T WASTE TIME
Started
Flowcharts
Backtracking
Variables & Data Types in Java
Time & Space Complexity
Operators
ArrayLists
if-else Statements
Linked Lists
Flow Control (Loops)
Stacks
Patterns
Queues
Functions & Methods
Greedy Algorithms
Arrays
Binary Trees
Sorting Algorithms
Binary Search Trees
2D Arrays
Heaps/Priority Queues
Strings
Hashing
Bit Manipulation
Tries
OOPs
Graphs
Recursion
Dynamic Programming
Divide & Conquer
Segment Trees
👍1
package com.Aman;
public class Mainmeh {
public static void main(Integer args){System.out.println("method 1");}
public static void main(char args){
System.out.println("method 1");
}
public static void main(String ... args){
System.out.println("method 1");
}
public static void main(long args){System.out.println("method 1");}
public static void main(double args){
System.out.println("method 1");
}
public static void main(float ... args){
System.out.println("method 1");
}
}
which statement will execute?
can we overload main method??
Anonymous Quiz
83%
yes
17%
no
🔥2
public class SpecialCase1 {
public static void main(String...args){
int k =1 ;
for(int i = 1; i<=5;i++){
for(int j = 1; j<=5;j++){
System.out.print(k++%10);
}
System.out.println();
}
}
}
public class ArmstrongNo1 {
public static void main(String[] arg) {
int i = 1, arm;
System.out.println("Armstrong numbers between 100 to 999");
while (i < 1000) {
arm = armstrongOrNot(i);
if (arm == i)
System.out.println(i);
i++;
}
}
static int armstrongOrNot(int num) {
int x, a = 0;
while (num != 0) {
x = num % 10;
a = a + (x * x * x);
num /= 10;
}
return a;
}
}
import java.util.*;
public class ArmstrongNo2 {
public static void main(String[] arg) {
int a, arm = 0, n, temp;
Scanner sc = new Scanner(System.in);
System.out.println("Enter a number");
n = sc.nextInt();
temp = n;
for (; n != 0; n /= 10) {
a = n % 10;
arm = arm + (a * a * a);
}
if (arm == temp)
System.out.println(temp + " is a armstrong number ");
else
System.out.println(temp + " is not a armstrong number ");
}
}
//import java.util.*;
//import static java.awt.font.NumericShaper.search;
public class Q24_1 {
public static void main(String[] args) {
// Scanner x = new Scanner(System.in);
//System.out.println(" enter 10 Digits ");
// int[] arr = new int[10];
// for (int i : arr) {
// arr[i] = x.nextInt();
int[] arr = {5, 6, 8, 9, 2, 4, 6, 1};
int toFind = 5;
boolean found = search(arr, toFind);
if (found)
System.out.println(toFind + " is found");
else
System.out.println(toFind + " is not found");
}
/*
* A method to search toFind in arr
* arr: the array to search
* toFind: the element to search
*/
public static boolean search(int[] arr, int toFind) {
int left = 0;
int right = arr.length - 1;
while (left <= right) {
int mid = (left + right) / 2;
if (arr[mid] == toFind) {
return true;
} else if (arr[mid] < toFind) {
left = mid + 1;
} else {
right = mid - 1;
}
}
return false;
}
}
public class Q25_1 {
public static void main(String[] args) {
int[] arr = {5, 6, 8, 9, 2, 4, 6, 1};
int left = 0, right = arr.length - 1;
while (left < right) {
while (arr[left] % 2 == 0 && left < right)
left++;
while (arr[right] % 2 == 1 && left < right)
right--;
if (left < right) {
int temp = arr[left];
arr[left] = arr[right];
arr[right] = temp;
left++;
right--;
}
}
System.out.println("Even numbers on left side and Odd numbers on right side: ");
for (int j : arr) System.out.print(j + " ");
// for (int i = 0; i < arr.length; i++)
// System.out.print(arr[i] + " ");
}
}
public class Q26_1 {
public static void main(String[] args) {
int[]arr = {5,6,8,9,2,4,6,1};
int largest = arr[0];
int secondLargest = arr[0];
System.out.println("The given array is:");
for (int k : arr) {
System.out.print(k + "\t");
}
for (int j : arr) {
if (j > largest) {
secondLargest = largest;
largest = j;
} else if (j > secondLargest) {
secondLargest = j;
}
}
System.out.print("Second largest number is:" + secondLargest);
}
}