Cognizant Java Coding Interview | Second Round | Java Developer Interview

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

Пікірлер: 110

  • @mrcoder9401
    @mrcoder9401 Жыл бұрын

    Interviewer: Is this your final answer? Buffalo in the background : AAAAAN, yesssss.

  • @Bajrangi_Bhaijaann

    @Bajrangi_Bhaijaann

    2 ай бұрын

    😂😂

  • @zeezinc7
    @zeezinc76 ай бұрын

    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.

  • @theanimemanofindia8036

    @theanimemanofindia8036

    6 ай бұрын

    It's a mock interview of some institute 2 year experience might not build logic that quickly 😅

  • @zeezinc7

    @zeezinc7

    6 ай бұрын

    @@theanimemanofindia8036 i myself am 2yrs exp bro 💀 i needed to watch it 4-5 times to understand properly😵

  • @theanimemanofindia8036

    @theanimemanofindia8036

    6 ай бұрын

    @@zeezinc7 yeah 💯 bro I had 1 year experience but only able to build logic, output is still wrong after 9th time😅

  • @zeezinc7

    @zeezinc7

    6 ай бұрын

    @@theanimemanofindia8036 keep at it, i dont even know how to write logic coz i never practiced dsa, but i just understood the question 🤣

  • @theanimemanofindia8036

    @theanimemanofindia8036

    6 ай бұрын

    @@zeezinc7 what are you doing now like job or study?

  • @beingSenpai
    @beingSenpai8 ай бұрын

    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

  • @amanrathore3610
    @amanrathore36107 ай бұрын

    Thanks for sharing,

  • @vsaihruthikreddy7127
    @vsaihruthikreddy71273 ай бұрын

    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

  • @SelvaKumar-xv9eb
    @SelvaKumar-xv9eb5 ай бұрын

    does cognizant only goes for python developers??? is this java coding interview or an coding interview where we can solve in diff languages??

  • @adnanraza1838
    @adnanraza1838 Жыл бұрын

    Nailed it bro🔥

  • @aabhasjain96
    @aabhasjain966 ай бұрын

    Can someone please explain the logic behind last question ?

  • @yashwanthreddygowreddigari1997
    @yashwanthreddygowreddigari19973 ай бұрын

    Good job bro 🎉🎉🎉🎉

  • @jaswanthreddy7135
    @jaswanthreddy71354 ай бұрын

    Range of integer is not -127 to 128 FYI that is for byte hence this mock interview is useless.

  • @athul03

    @athul03

    2 ай бұрын

    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.

  • @nagunagu229
    @nagunagu2296 ай бұрын

    if(ans==yes){ print("aooooo"); } 😅 buffalo in background 😅

  • @croydon21H
    @croydon21H3 ай бұрын

    @11:56 alternate answer String answer = nums.stream().sorted((o1, o2) -> (o2+o1).compareTo(o1+o2) ).collect(Collectors.joining(""));

  • @845shubham
    @845shubham Жыл бұрын

    Bro are you able to crack the interview???

  • @mahesh0371
    @mahesh03715 ай бұрын

    Present companies.... Asking easy questions to experienced candidates.. Tough questions to fresher candidates....😢

  • @ShubhamKumar-pe3dt

    @ShubhamKumar-pe3dt

    4 ай бұрын

    Diya hai kya interview experienced candidate ke liye? 4-5 round karaate hain uske baad bolte hain salary is out of budget.

  • @mahesh0371

    @mahesh0371

    4 ай бұрын

    @@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...

  • @unkownindian11

    @unkownindian11

    4 ай бұрын

    @@mahesh0371konsa mern stack mei kr rhe ho apply?

  • @mahesh0371

    @mahesh0371

    4 ай бұрын

    @@unkownindian11 full stack Dot net development

  • @TheMumbai31
    @TheMumbai316 ай бұрын

    What was the third questions .. not clear

  • @rushikeshgodase8498
    @rushikeshgodase84986 ай бұрын

    what was the last question???

  • @harshwardhanshetty4683
    @harshwardhanshetty46834 ай бұрын

    the largest number problem if done without comparator interviewer will be happy ??

  • @hrithikgupta1134
    @hrithikgupta11346 ай бұрын

    wow nice bro

  • @vish3890
    @vish38905 ай бұрын

    What is the correct answer ?please share

  • @user-pd5hj3jc3x
    @user-pd5hj3jc3x4 ай бұрын

    One more last question: what was that moooo in the background?

  • @jacksandy-oh8gf
    @jacksandy-oh8gf6 ай бұрын

    I'm confused with 3rd answer

  • @bhaveshjoshi9404
    @bhaveshjoshi94044 ай бұрын

    question1 - demo class - 500 is a whole number that can be written without a fractional so output would be num1==num2 num3 == num4 correct ?

  • @sekharch2918

    @sekharch2918

    3 ай бұрын

    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).

  • @Aman-kd6js
    @Aman-kd6js6 ай бұрын

    for a comment"You are correct"

  • @katreji
    @katreji2 ай бұрын

    @bro, where you learned Java , plz help me

  • @arunsinghrajpoot5363
    @arunsinghrajpoot5363 Жыл бұрын

    Bhiya like that label questions asked in airtal labs also

  • @GenieAshwani

    @GenieAshwani

    Жыл бұрын

    Airtel asked bit DSA side question and it also depends on you interviewer

  • @croydon21H

    @croydon21H

    3 ай бұрын

    @@GenieAshwani what is DSA?

  • @kn24

    @kn24

    3 ай бұрын

    ​@@croydon21HDATA STRUCTURE ALGORITHM

  • @SurajRoy
    @SurajRoy6 ай бұрын

    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)

  • @anoysantra9851

    @anoysantra9851

    6 ай бұрын

    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..!! :)

  • @pragadeesh9044

    @pragadeesh9044

    6 ай бұрын

    Thanks for posting this question. I too had the same feeling and scared a bit.

  • @HR-pz7ts

    @HR-pz7ts

    5 ай бұрын

    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.

  • @aditisingh6330

    @aditisingh6330

    5 ай бұрын

    while practicing , understanding each and every line you code, why and how it is happening internally will surely help

  • @DhavalBirade

    @DhavalBirade

    5 ай бұрын

    ​@@anoysantra9851🎉

  • @arnavjadhav2659
    @arnavjadhav26593 ай бұрын

    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.

  • @invisibleplayz5036

    @invisibleplayz5036

    3 ай бұрын

    U r 👍

  • @user-we2dt3xv9k
    @user-we2dt3xv9k2 ай бұрын

    Very easy interview

  • @Cosmo_Gamer
    @Cosmo_Gamer4 ай бұрын

    Just 3 questions?

  • @trishulcurtis1810
    @trishulcurtis18104 ай бұрын

    I guess you have already seen the last question before this interview

  • @deepakdevkar7174
    @deepakdevkar71749 ай бұрын

    2nd question answer is not correct..everything would print from base class as DoPrint method taking reference as Base class.

  • @shubhamshejaval8526

    @shubhamshejaval8526

    7 ай бұрын

    Nah bro, he is right, that's called upcasting. Where obj can call all the overridden methods of derived class

  • @user-zn8dm8cp5t
    @user-zn8dm8cp5t5 ай бұрын

    2nd one's wrong right? You cannot downcast an object right?

  • @hindutwa7462

    @hindutwa7462

    4 ай бұрын

    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

  • @user-zx5zx4ic4u
    @user-zx5zx4ic4u3 ай бұрын

    genie bhaiya interview de rehe the ya shika rehe the 😂😂😂

  • @huhahahahhaa
    @huhahahahhaa6 ай бұрын

    That cow sound got me 😢

  • @saicharanmiriyala4985
    @saicharanmiriyala49856 ай бұрын

    In First question, Integer range is not -127 to 128 right, it a range of byte

  • @faisalfarhan8090

    @faisalfarhan8090

    5 ай бұрын

    I also didnt get 1st one

  • @ophirfernandes3869

    @ophirfernandes3869

    5 ай бұрын

    Huh

  • @ophirfernandes3869

    @ophirfernandes3869

    5 ай бұрын

    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.

  • @faisalfarhan8090

    @faisalfarhan8090

    5 ай бұрын

    I thought Byte has range from -128 to 127

  • @ranveervaghela7030

    @ranveervaghela7030

    2 ай бұрын

    Bro it is Integer Cache Array range -128 to 127. First learn wrapper classes

  • @siddharthsekharsingh4263
    @siddharthsekharsingh42637 ай бұрын

    I got placed in both Cognizant and Deloitte. Thank you.

  • @GenieAshwani

    @GenieAshwani

    7 ай бұрын

    Congratulations 🎉

  • @sarthakpasalkar6738

    @sarthakpasalkar6738

    6 ай бұрын

    @siddharthsekharsingh4263 how was the test of deloitte?

  • @shahidavalisyed487

    @shahidavalisyed487

    6 ай бұрын

    What they asked bro majorly

  • @vlog_with_SK
    @vlog_with_SK6 ай бұрын

    😂😂 what !! Is it really 2 yr experience interview.even I can solve it as a fresher.

  • @shiVam01242

    @shiVam01242

    5 ай бұрын

    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

  • @movietrailer3616
    @movietrailer36168 ай бұрын

    2 nd question is unclear can anyone explain what actually ahe asked on interview?

  • @aadityaa.

    @aadityaa.

    7 ай бұрын

    Given the array, return the reverse array but in a string..

  • @gautam_505

    @gautam_505

    6 ай бұрын

    ​@@aadityaa.She said form largest number in an array

  • @aj9706

    @aj9706

    6 ай бұрын

    ​@@gautam_505just sort it and reverse it .

  • @saurabhnaigaonkar7918
    @saurabhnaigaonkar79184 ай бұрын

    Derived ❌ drived ✅

  • @hiteshsharma9192
    @hiteshsharma91926 ай бұрын

    How 9534330 is correct if she asking to print reverse then it should be 9534303

  • @krishnachandrarai8759

    @krishnachandrarai8759

    6 ай бұрын

    That's what i was also thinking of

  • @gautam_505

    @gautam_505

    6 ай бұрын

    Largest number would be 9543330 right? I didn't get how it's right

  • @abhaykushwah3301

    @abhaykushwah3301

    6 ай бұрын

    She didn't said that he is right

  • @rajjaiswal4769

    @rajjaiswal4769

    6 ай бұрын

    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

  • @programmer519

    @programmer519

    5 ай бұрын

    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.......

  • @raghavendrac1053
    @raghavendrac1053 Жыл бұрын

    I didn't get the last question

  • @Scrollwthshailesh97

    @Scrollwthshailesh97

    9 ай бұрын

    I also confused

  • @croydon21H
    @croydon21H3 ай бұрын

    @4:10 same as 39:16 of kzread.info/dash/bejne/hYSoxMeTYpO1pLA.html . OK this is how interviews happen in India

  • @nikhilmishra9337
    @nikhilmishra93375 ай бұрын

    Any java develooer from bangalore please ping me

  • @RochaNahuel
    @RochaNahuel7 ай бұрын

    Se escucho una vaca de fondo o yo estoy mal? jajajaa

  • @andersonlavor

    @andersonlavor

    4 ай бұрын

    Estás mal. Son 2 vacas 😂

  • @jagadishroy6063
    @jagadishroy6063 Жыл бұрын

    Sir itna easy hota h kya!!!

  • @GenieAshwani

    @GenieAshwani

    Жыл бұрын

    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

  • @jagadishroy6063

    @jagadishroy6063

    Жыл бұрын

    @@GenieAshwani ha sir. Last wala though tha thora.

  • @jagadishroy6063

    @jagadishroy6063

    Жыл бұрын

    But sir is this real cognizant interview? How to get chance for these type of interviews.

  • @GenieAshwani

    @GenieAshwani

    Жыл бұрын

    @@jagadishroy6063 When you will exp they will call you or you can react out to them on linkedin

  • @replytohaters

    @replytohaters

    6 ай бұрын

    @@GenieAshwani How to reach out to them..means How to ask referal with them?

  • @saurabhnaigaonkar7918
    @saurabhnaigaonkar79184 ай бұрын

    Derived ❌ drived ✅

Келесі