Cognizant Java Coding Interview | Second Round | Java Developer Interview
HTML-код
- Опубликовано: 7 сен 2024
- Cognizant Java Coding Interview | Second Round | Java Developer Interview
Social Links:
Insta: / ashwani_a_j
Linkedin: / ashwani-kumar-7b986a14b
Telegram Channel: t.me/JavaGenie
About Video:
In this video, we have covered all the questions asked to me in the recent cognizant interview.
Do let me know in the comments section about what else you would like to see on this channel. Your feedback matters a lot! If you have any questions please comment down below.
Publicis Sapient Interview Process: • Publicis Sapient Inter...
EPAM Interview Process: • EPAM Interview Process...
Placement Roadmap: • Placement Roadmap For ...
My Experience at Cognizant: • My Experience at Cogni...
About this video:
In this video, we will talk about your fir salary
Please leave a LIKE and SUBSCRIBE for more content!
⭐ Tags ⭐
✅ Hashtags ✅
#cognizantinterview | #javadeveloper | #codinginterview
Important Videos:
✅ Microservices with real-time project: • Microservices with rea...
✅ GraphQl In one video: • GraphQL In One Video |...
✅ Keycloak With Spring Boot: • Keycloak with Spring B...
✅ EPAM Interview Process: • EPAM Interview Process...
✅ Cognizant Experience part-1: • My Experience at Cogni...
✅ Spring Security Introduction: • Spring Security Tutori...
✅ Spring Security Internal working: • Spring Security Tutori...
✅ Changing default behavior of spring security: • Spring Security Tutori...
✅ what is ci cd pipeline: • ci cd pipeline| DevOps...
✅ what is scrum and sprint in the agile model: • What is Scrum in Softw...
✅ learn docker in 1 hour: • Docker Tutorial for Be...
✅ complete spring data jpa tutorial: • Spring Data JPA in 1 v...
✅ debugging in eclipse java with source code: • Eclipse debugging tech...
✅ oop interview questions and answers: • OOPS Interview Questio...
Important playlists :
✅ Spring Security Tutorial: • Spring Security Tutori...
✅ Microservices full course playlist: • Microservices full cou...
✅ java 8 features: • JAVA 8 NEW FEATURES
✅ Building a Medicine Management app with Spring Boot and Java: • Building a Medicine Ma...
✅ Linux tutorial: • UNIX | LINUX Shell Scr...
✅ spring boot interview questions: • Spring Boot Interview ...
cognizant Java Coding Interview | Second Round | Java Developer Interview
Interviewer: Is this your final answer?
Buffalo in the background : AAAAAN, yesssss.
😂😂
To those who didnt understand the last question,basically they give you an array of string numbers and you have to rearrange the elements inside such that it makes the largest number possible with that combination. So '9''5''34''3''30' is the largest one possible, 330>303 hence that last change.Pretty interesting and tricky question.
It's a mock interview of some institute 2 year experience might not build logic that quickly 😅
@@theanimemanofindia8036 i myself am 2yrs exp bro 💀 i needed to watch it 4-5 times to understand properly😵
@@zeezinc7 yeah 💯 bro I had 1 year experience but only able to build logic, output is still wrong after 9th time😅
@@theanimemanofindia8036 keep at it, i dont even know how to write logic coz i never practiced dsa, but i just understood the question 🤣
@@zeezinc7 what are you doing now like job or study?
There is an edge case with the largest number code now if you have 0 and 0 in the string this will print “00” and not “0” if interviewer specifically asks for “0” and not “00” as output then I believe we can add that case after sorting the string array
last question we can do digit sort which takes O(D*N) your approach take O(N*N)
D = size of largest length string
N = size of array
Present companies....
Asking easy questions to experienced candidates..
Tough questions to fresher candidates....😢
Diya hai kya interview experienced candidate ke liye? 4-5 round karaate hain uske baad bolte hain salary is out of budget.
@@ShubhamKumar-pe3dt I'm a fresher bro, attended 20+ interviews still jobless....I have lot of skills, technically strong....
But, companies are playing games for hiring freshers...
@@mahesh0371konsa mern stack mei kr rhe ho apply?
@@unkownindian11 full stack Dot net development
if(ans==yes){
print("aooooo");
}
😅 buffalo in background 😅
Range of integer is not -127 to 128 FYI that is for byte hence this mock interview is useless.
Usually == checks for memeory references in case of objects and value in the case of primitive variables.
But here is a twist that for Integer objects, JVM use cache for values from -128 to 127. Thus, the program will return true both times. But if we use any value higher than 127 the if loop will execute the else condition.
first question answer should be num1== num2 num3==num4 because it is not in byte and byte has -127 to 128 range not integer please correct me if wrong.
U r 👍
For last 5 years I am working as a fullstack webdeveloper in different govt. undertaking projects (Contractual post) and using jsp, springboot, core php, android app, mysql, PostgreSQL. But I can't answer a single question from these (though I understand logic of these answers after explanation) ........ Can anybody explain why ? (I think these can be answered by someone who is more connected to theories and studies or a fresher who is just completed his graduation)
I too was asked these type of o/p prediction questions. Though these are very basic I was not able to answer few of them. I think constant practising of 5-6 qsts like this will help..!! :)
Thanks for posting this question. I too had the same feeling and scared a bit.
I could answer all of these except the last one although I understood the logic completely. It's because I'm a little rusty in DSA I'll continue it as soon as I'm done with servlets and jsp.
while practicing , understanding each and every line you code, why and how it is happening internally will surely help
@@anoysantra9851🎉
@11:56 alternate answer String answer = nums.stream().sorted((o1, o2) -> (o2+o1).compareTo(o1+o2) ).collect(Collectors.joining(""));
question1 -
demo class - 500 is a whole number that can be written without a fractional so output would be
num1==num2
num3 == num4 correct ?
from integers within the range -128 to 127 will be stored in cache by JVM (so 100 will be in JVM cache and same memory reference is assigned to num1,num2) ,out side of this range will be stored in Heap memory(num3 and num4 will point to different 500 objects).
Nailed it bro🔥
Can someone please explain the logic behind last question ?
does cognizant only goes for python developers??? is this java coding interview or an coding interview where we can solve in diff languages??
2nd question answer is not correct..everything would print from base class as DoPrint method taking reference as Base class.
Nah bro, he is right, that's called upcasting. Where obj can call all the overridden methods of derived class
😂😂 what !! Is it really 2 yr experience interview.even I can solve it as a fresher.
Bhai fresher ke liye hi zyada easy hai... experienced ke liye tough, and I have a logic too... experienced ppl mostly work in projects with some framework where we dont need these concepts in such depth... it just vanishes with time, that's why it becomes challenging for an experienced guy
Good job bro 🎉🎉🎉🎉
I got placed in both Cognizant and Deloitte. Thank you.
Congratulations 🎉
@siddharthsekharsingh4263 how was the test of deloitte?
What they asked bro majorly
In First question, Integer range is not -127 to 128 right, it a range of byte
I also didnt get 1st one
Huh
We always thought that whenever two object references are compared using “==”, it always evaluates to “false”. But here Integer caching changes the results.Integer class has a caching range of -128 to 127. Whenever a number is between this range and autoboxing is used, it assigns the same reference. That’s why for value 100, both num1 and num2 will have the same reference, but for the value 500 (not in the range of -128 to 127), num3 and num4 will have different reference.
I thought Byte has range from -128 to 127
Bro it is Integer Cache Array range -128 to 127. First learn wrapper classes
One more last question: what was that moooo in the background?
Thanks for sharing,
Bhiya like that label questions asked in airtal labs also
Airtel asked bit DSA side question and it also depends on you interviewer
@@GenieAshwani what is DSA?
@@croydon21HDATA STRUCTURE ALGORITHM
sir , i have gap in my carrier , so please give me some advise to revive me
the largest number problem if done without comparator interviewer will be happy ??
What was the third questions .. not clear
I guess you have already seen the last question before this interview
genie bhaiya interview de rehe the ya shika rehe the 😂😂😂
2 nd question is unclear can anyone explain what actually ahe asked on interview?
Given the array, return the reverse array but in a string..
@@aadityaa.She said form largest number in an array
@@gautam_505just sort it and reverse it .
@bro, where you learned Java , plz help me
what was the last question???
for a comment"You are correct"
2nd one's wrong right? You cannot downcast an object right?
You can , that is called dynamic method dispatch
Object Reference is base class 's but it points to child class
Compiler checks but JVM binds the method
@4:10 same as 39:16 of ruclips.net/video/SPtbeZ20OtM/видео.html . OK this is how interviews happen in India
I'm confused with 3rd answer
That cow sound got me 😢
Bro are you able to crack the interview???
What is the correct answer ?please share
Very easy interview
Derived ❌ drived ✅
wow nice bro
How 9534330 is correct if she asking to print reverse then it should be 9534303
That's what i was also thinking of
Largest number would be 9543330 right? I didn't get how it's right
She didn't said that he is right
He's right, you don't have alter numbers in array , just manipulate numbers in array in such a way that it gives largest possible number
brother can you change one int number 34 to 43 i mean its harcoded to 34 hope you understood thats why and @gautam_505 is 95.......
Just 3 questions?
I didn't get the last question
I also confused
Any java develooer from bangalore please ping me
Se escucho una vaca de fondo o yo estoy mal? jajajaa
Estás mal.
Son 2 vacas 😂
Sir itna easy hota h kya!!!
jagadish bhai last wala question easy nhi tha yr agar pahle esa question nhi dekha ho to time lagta ha GKG ka medium level ka question ha
@@GenieAshwani ha sir. Last wala though tha thora.
But sir is this real cognizant interview? How to get chance for these type of interviews.
@@jagadishroy6063 When you will exp they will call you or you can react out to them on linkedin
@@GenieAshwani How to reach out to them..means How to ask referal with them?
Derived ❌ drived ✅