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
public class StringImmutable {

public static void main(String[] args) {
String str1 = "Hello";
String str2 = "World";

// Concatenating two strings
String str3 = str1.concat(str2);

// printing the result
System.out.println("String after concatenation = " + str3);

// changing the original strings
str1 = str1.concat("123");
str2 = str2.concat("456");

// printing the modified strings
System.out.println("String1 after modification = " + str1);
System.out.println("String2 after modification = " + str2);

// printing the final result
System.out.println("Final String after concatenation = " + str3);
}
}
import java.io.*;
public class CountChar
{

public static void main(String[] args) throws IOException
{
String ch;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter the Statement:");
ch=br.readLine();
int count=0,len=0;
do
{
try
{
char name[]=ch.toCharArray();
len=name.length;
count=0;
for(int j=0;j<len;j++)
{
if((name[0]==name[j])&&((name[0]>=65&&name[0]<=91)(name[0]>=97&&name[0]<=123)(name[0]>=48&&name[0]<=57)))
count++;
}
if(count!=0)
System.out.println(name[0]+" "+count+" Times");
ch=ch.replace(""+name[0],"");
}
catch(Exception ex){}
}
while(len!=1);
}
👍1
Allowing copy message
Forwarded from Java Hyd Team
Spring BOOT 👢🥾 STARTED
public class ReverseWordsInSentence {
public static void main(String[] args) {
String sentence = "which is the biggest continent";
String[] words = sentence.split(" ");
String reversedSentence = "";
for (int i = 0; i < words.length; i++) {
String word = words[i];
String reversedWord = "";
for (int j = word.length() - 1; j >= 0; j--) {
reversedWord = reversedWord + word.charAt(j);
}
reversedSentence = reversedSentence + reversedWord + " ";
}
System.out.println(reversedSentence);
}
}
public class Q29_1 {
static void printAllSubsets(int[] A, int K) {
int N = A.length;
for (int i = 0; i < (1 << N); i++) {
int sum = 0;
for (int j = 0; j < N; j++) {
if ((i & (1 << j)) > 0)
sum += A[j];
}
if (sum == K) {
for (int j = 0; j < N; j++) {
if ((i & (1 << j)) > 0)
System.out.print(A[j] + " ");
}
System.out.println();
}
}
}
public static void main(String[] args) {
int[] A = {0, 1, 2, 3, 5, 6, 7, 11, 12, 14, 20};
int K = 7;
printAllSubsets(A, K);
}
}
👍1
A surprise for everyone here just open this link 🖇️ get everything for your practice don't miss this



https://drive.google.com/drive/folders/1aeAAl5C-HdkXzQMxLjpbkbNuCdytAsdW



https://drive.google.com/drive/folders/1IYTKzuGY6GxAujrQA-Tucv-KBt6v2RQq
Two drive links
If someone is getting access to docs let me know before asking because you can't see some data

Docs link is in description
You can join here for questions and discussions
Do you guy's want to give a Java test regarding programming
Anonymous Poll
86%
Yes
14%
No
React programming and MCQ tests
Anonymous Poll
95%
Yes
5%
No