Java 8 Coding Interview questions

preview_player
Показать описание
Java 8 Coding questions and answers for experienced.

One of the best book for Interview Questions

📌 Do Subscribe for all Updates.

Telegram : Drunken Engineer

You can follow us on Facebook :

#java8 #codingQuestions
Рекомендации по теме
Комментарии
Автор

int input[] ={5.1, 3, 2, -1, 9}
int sum=4;
int output]= { {0, 4}, {1, 2}};
input array. create the output array which has the position of input array, when the sum of elements is equal to 4.
EG: input[0]+ input[4]= 4
input[1]+ input[2] = 4
write a java program without using 2 for loop.

josephprabhuubaharam
Автор

Good channel for interview preparation

inserachof
Автор

Really good bro..keep adding the videos.

annapureddyravi
Автор

this is the thing i had done without using any function.identity.
// find no of numbers in a list.
List<Integer> list7 = Arrays.asList(5, 3, 4, 1, 3, 7, 2, 9, 9, 4);
Map<Integer, Long> map4 = -> q, Collectors.counting()));
System.out.println("\n no of values is " + map4);

// find no of numbers in a list.
List<String> sList = Arrays.asList("amanda", "rob", "amanda", "gaurav", "rob");
TreeMap<String, Long> map5= sList.stream().collect(Collectors.groupingBy(w->w, TreeMap::new, Collectors.counting()));
System.out.println("\n no of words in a string are " + map5);

kesagaurav
Автор

I was asked the same question in one of my last interviews. I used the traditional map with key as the string and value for count. But not aware of this one. Thanks a lot

Kj-qjbc
Автор

I have watched all your java coding interview questions and it is really worth it ... Please keep on sharing more such videos which covers java 8+ concepts, And tricky coding interview questions, Spring Boot, Microservices basically what is needed to crack Java Backend interview 😊👍

karishmarawat
Автор

your audio is very low, please take notice of it

neelabhrai
Автор

That's the same question I was aksed

sanketjain
Автор

I was also asked same question thrice in different companies interview. Each time I couldn't solve using Java 8

harshadholkar
Автор

Today I was encountered with same question in interview

sivareddydornala
Автор

I was asked same question.. I'm also unable to answer.. Tq so much

Naveen_Chowdary_dhfm
Автор

Ivy comptech Hyderabad ?
That's where my sister works

sanathrayala
Автор

Could you please post other questions that was asked?

joelgeorge
Автор

traditional way

List<String> strList= Arrays.asList("Amanda", "Rob", "Sunny", "Amanda", "Rob");
Map<String, Integer> strMap=new HashMap<>();
for(String st:strList){
strMap.put(st, strMap.containsKey(st) ? (strMap.get(st) + 1) : 1);
}
System.out.println(strMap);

venkatb
visit shbcf.ru