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
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.function.Consumer;
import java.util.stream.*;
public class EdM1 extends EdM{

//private static final Object e = null;

public EdM1(int empNo, String empName, String gender, int basicSal, String city, String deptName) {
super(empNo, empName, gender, basicSal, city, deptName);
}

@SuppressWarnings("unchecked")
public static void main(String[] args) {
List <EdM1> liste= new ArrayList<EdM1>();
liste.add(new EdM1(1001,"Kannababu","m",40000,"Hyderabad","EIE"));
liste.add(new EdM1(1002,"Srinivas","m",42000,"Chennai","CSE"));
liste.add(new EdM1(1003,"Yakub","m",45000,"Banglore","CSE"));
liste.add(new EdM1(1004,"Venktesh","m",55000,"Hyderabad","CSE"));
liste.add(new EdM1(1005,"Samantha","f",65000,"Chennai","ECE"));
liste.add(new EdM1(1006,"Anushka","f",43000,"Banglore","EIE"));
liste.add(new EdM1(1007,"Shekhar","m",23000,"Banglore","EIE"));
//Q1.)
float sum=0;
float da;
float hra;float tsal;
for(EdM1 e:list) {
// System.out.println(e.empNo+","+e.empName+","+e.gender+","+e.basicSal+","+e.city+","+e.deptName);
System.out.println(e.toString());

// //Q2.)
// if(e.basicSal>45000)
// System.out.println(e.toString());
// //Q3.)
// if (e.city.equalsIgnoreCase("Hyderabad"))
// System.out.println(e.toString());
// //Q4.)
// System.out.println(list.size());
// //Q5.)
// if(e.deptName.equalsIgnoreCase("CSE"))
// System.out.println(e.toString());
// //Q6.)
// if(e.basicSal>45000 && e.basicSal<60000)
// System.out.println(e.toString());
// //Q7.)
// if(e.gender.equalsIgnoreCase("m") || e.gender.equalsIgnoreCase("f"))
// System.out.println(e.toString());
// //Q8.)
// if (e.city.equalsIgnoreCase("Hyderabad")&& e.basicSal>40000)
// System.out.println(e.toString());
// //Q9.)
// if (e.city.equalsIgnoreCase("Banglore"))

// for(int i = 0;i<list.size();i++)
// sum+= list.get(i);
//
// System.out.println(sum);
// sum = sum+ e.basicSal;
// }
// System.out.println(sum);
// System.out.println(e.toString());
// //Q10.)
// if(e.deptName.equalsIgnoreCase("ECE"))
// System.out.println(e.toString());
// //Q11.)
// da=(float) (0.20+basicSal);
// hra=(float) (0.40+basicSal);
// tsal = da + hra + basicSal;
// System.out.println(e.toString()+tsal);
//Q12.)
// if(e.empName.equalsIgnoreCase("Samantha"))
// System.out.println(e.basicSal);
// }
// Comparator com = (Object o1, Object o2)-> {
// EdM e1 = (EdM)o1;
// EdM e2 = (EdM)o2;
// return e2.empName.compareTo(e1.empName);
// };
// Collections.sort(liste, com);
// for(EdM1 a : liste) {
// System.out.println(a.toString());
// }
//Consumer c = (e) -> {System.out.println(e);};
// Consumer c = System.out::println;
// liste.forEach(c);
// Stream s = liste.stream().filter(e-> e.basicSal > 45000);
// s.forEach(System.out::println);
๐Ÿ‘1
Top Java Interview Questions and Answers (2022) - InterviewBit
https://www.interviewbit.com/java-interview-questions/amp/
Join here for messaging
Either wrong or right please let me know will help you in
If you will solve this i will refer your profile in Amazon for SDE1
When I started learning ๐——๐—ฆ๐—”. I didnt know how difficult it was going to be or for how long I will be able to give time to this. I only knew basics of C++ and some basic data structure like: stacks and queues.

And still, DSA and System Design are the two things upon which you'll be most grilled on in interviews of almost all product-based companies.

But bhaiya, mai try toh kar rha hu, par questions hote hi nhi hai.

Kya karu, I'm getting demotivated.๐Ÿ˜

I remember, I also feel the same way when I started with DSA in my college.

I heard about ๐—ฆ๐—ฃ๐—ข๐—, ๐—ฐ๐—ผ๐—ฑ๐—ฒ๐—ฐ๐—ต๐—ฒ๐—ณ and ๐—ต๐—ฎ๐—ฐ๐—ธ๐—ฒ๐—ฟ๐—ฟ๐—ฎ๐—ป๐—ธ in college. I tried ๐—–๐—ผ๐—ฑ๐—ฒ๐—–๐—ต๐—ฒ๐—ณ, could not understand the UI and how to read the inputs in my program, so I left it. Looked at ๐—ฆ๐—ฃ๐—ข๐—, didnt like the UI either.

I tried ๐—š๐—ฒ๐—ฒ๐—ธ๐˜€๐—ณ๐—ผ๐—ฟ๐—ด๐—ฒ๐—ฒ๐—ธ, then jumped to ๐—–๐—ผ๐—ฑ๐—ฒ๐—–๐—ต๐—ฒ๐—ณ, ๐—›๐—ฎ๐—ฐ๐—ธ๐—ฒ๐—ฟ๐—˜๐—ฎ๐—ฟ๐˜๐—ต, ๐—Ÿ๐—ฒ๐—ฒ๐˜๐—–๐—ผ๐—ฑ๐—ฒ, etc, and in fact participated in a lot of contests.โญ

It's not really hard to master DSA. It's just you need to be more consistent in solving at least a problem daily.

Believe me, Consistency is the Key โณ

Some of the Major reasons people not improving in problem-solving and DSA is they are lacking consistency.

Hard to do LeetCode or GeeksForGeeks daily, but if you convince your mind to do it as a habit then it will be easy.

No matter what happens, you will ๐—ณ๐—ฒ๐—ฒ๐—ฑ ๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐—น๐˜ƒ๐—ฒ๐˜€ daily because you have been doing it for a long time and you have no trouble doing it.

Try to do same habit with your favourite coding platform..

Fix a slot in the day / night as per your convenience, and do LeetCode daily at the same time.

Doing this 2-3 months without missing a single day, missing a day will be more difficult in doing LeetCode that day.

You'll soon see the magic of being consistent in your problem-solving skills.

Freshly, I came across this useful resource of DSA. You can have a look at it by clicking on the given link below.
I will share the link for learning only when you will complete above code ๐Ÿ˜Š๐Ÿ˜Š
Do you want a session tom. morning on Stream Api morning 6am?
Anonymous Poll
92%
yes
8%
no
Only 4 votes looks like everyone else knows
5_6260363954355177857.pdf
788.3 KB
DATA STRUCTURES HAND WRITTEN NOTES PART 1
๐Ÿ‘1
Wipro sending assessment test links pls do check your mail
not possible to send folders as it contains more than 2000 files i will update on my git kindly go through
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class TestEmp {

public static void main(String[] args ) {
List<Employeee1> empList = new ArrayList<>();
empList.add(new Employeee1(1, 10000));
empList.add(new Employeee1(2, 15000));
empList.add(new Employeee1(3, 12000));

System.out.println("Before Total Sal----------------");
empList.forEach(System.out::println);

// for(Employeee1 e : empList) {
// int da = (int) (e.basicSal * 0.2);
// int hra = (int) (e.basicSal * 0.3);
// e.totalSal = da + hra + e.basicSal;
// }
// System.out.println("After Total sal----------------");
// empList.forEach(System.out::println);
//
// List<Employeee1> lowSal = new ArrayList<>();
// for(Employeee1 e : empList) {
// if(e.totalSal < 20000) {
// e.totalSal += 5000;
// lowSal.add(e);
// }
// }
//
// System.out.println("After Low----------------");
// lowSal.forEach(System.out::println);

System.out.println("Streams------------");

List<Employeee1> streamList = empList.stream().map(e -> {
int da = (int) (e.basicSal * 0.2);
int hra = (int) (e.basicSal * 0.3);
e.totalSal = da + hra + e.basicSal;
return e;
}).collect(Collectors.toList());

for(Employeee1 e : streamList) {
System.out.println(e.toString());
}
System.out.println("Streams low sal------------");

streamList.stream().filter(e -> e.totalSal < 20000).map(e -> {
e.totalSal += 5000;
return e;
}).forEach(System.out::println);

}
}
public class Employeee1 {

int empNo;
int basicSal;
int totalSal;

public Employeee1(int empNo, int basicSal) {
super();
this.empNo = empNo;
this.basicSal = basicSal;
}

public int getEmpNo() {
return empNo;
}

public void setEmpNo(int empNo) {
this.empNo = empNo;
}

public int getBasicSal() {
return basicSal;
}

public void setBasicSal(int basicSal) {
this.basicSal = basicSal;
}

public int getTotalSal() {
return totalSal;
}

public void setTotalSal(int totalSal) {
this.totalSal = totalSal;
}

@Override
public String toString() {
return "Employeee1 [empNo=" + empNo + ", basicSal=" + basicSal + ", totalSal=" + totalSal + "]";
}





}