Most Asked Tricky Core Java Interview Questions and Answers for Fresher and Experienced |Code Decode

In Tricky Core Java Interview Questions and Answers for Freshers and Experienced video you will get top tricky core interview question asked in an Interview.
Udemy Course of Code Decode on Microservice k8s AWS CICD link:
openinapp.co/udemycourse
Course Description Video :
yt.openinapp.co/dmjvd
You may be asked in java interview questions and answers pattern about :
What are the different ways we can break a singleton pattern pattern in Java?
Reflection
Serialization
Cloning
By Executor service, will create separate video on that.
One of the tricky part of java interview questions and answers are :
Difference between
NoClassDefFoundError
and
ClassNotFoundException?
java interview questions and answers for experienced people may be bit trickier.
Apart from String, what else predefined class we can use as Keys in A Map?
java interview questions and answers for experienced people will always cover some java 8 stuff
Given an Employee list , sort employees based on their salaries in desc order?
Java interview questions and answers will always cover top java interview questions and answers and java 8 always dominates it now a days
Fetch Top 3 salaried Employees?
Java interview questions and answers may be twisted to fetch result in different manner too as shown as below
Fetch all employees having salary less than 3rd highest salary?
Java interview questions and answers playlist is referenced below for easy access.
In top java interview questions and answers or for core java interview questions and answers , you will never be asked straight forward questions like below:
Why is char[] preferred over String for passwords?
In Java, Strings are immutable and are stored in the String pool. What this means is that, once a String is created, it stays in the pool in memory until being garbage collected. Therefore, even after you’re done processing the string value (e.g., the password), it remains available in memory for an indeterminate period of time thereafter (again, until being garbage collected) which you have no real control over.
Therefore, anyone having access to a memory dump can potentially extract the sensitive data and exploit it.
In contrast, if you use a mutable object like a character array, for example, to store the value, you can set it to blank once you are done with it with confidence that it will no longer be retained in memory.
Theses were some java interview questions and answers
Code Decode Playlists
Most Asked Core Java Interview Questions and Answers : • Core Java frequently a...
Advance Java Interview Questions and Answers : • Advance Java Interview...
Java 8 Interview Questions and Answers : • Java 8 Interview Quest...
Hibernate Interview Questions and Answers : • Hibernate Interview Qu...
Spring Boot Interview Questions and Answers : • Advance Java Interview...
Angular Playlist : • Angular Course Introdu...
GIT : • GIT
Subscriber and Follow Code Decode
Subscriber Code Decode : kzread.info?...
Linkedin : / codedecodeyoutube
Instagram : / codedecode25
#JavaInterviewQuestionsandAnswers #JavaInterviewQuestions #Intellipaat #JavaInterview #CoreJavaInterviewQuestions #JavaInterviewQuestionsandAnswersForExperienced #JavaTutorial #JavaProgramming #JavaTutorialForBeginners

Пікірлер: 132

  • @sanketh768
    @sanketh7683 жыл бұрын

    Would love to see a detailed video on different ways of breaking singleton pattern. Please make a video on it. It would be helpful for many people

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Sure Sanketh, we will create that soon 👍👍

  • @imvickie1497

    @imvickie1497

    3 жыл бұрын

    kzread.info/dash/bejne/gmig0dWRYKvep6g.html

  • @shilparani6266

    @shilparani6266

    2 жыл бұрын

    @@CodeDecode is this video created, if yes please share video link

  • @muralikommuru5992
    @muralikommuru59923 жыл бұрын

    Great, always there is something new to learn in your videos....! And please prepare video on executor service breaking Singleton. @Code Decode. Also would like to highlight as @shankar did that class not found is compile time because compiler forces us to handle that exception. It’s not like any other nullpointer exception which our compiler doesn’t, force to handle. That’s the key I think, but as you said we have to decide by seeing that whether compiler is checking DRIVER class or not, then I think no exception can be called as compile time exception. PLEASE CORRECT ME IF MY UNDERSTANDING IS WRONG.

  • @karthikeyanrm3446
    @karthikeyanrm34463 жыл бұрын

    Excellent video. Yes, few more java 8 scenario based questions, also scenario based for core java concepts - like abstract class, interface etc.. also we are asked how to create hashing on our own and something similar to strings as well?

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Nice topics Karthikeyan 👍 we will surely create video on these

  • @TheITEngineer
    @TheITEngineer3 жыл бұрын

    Mam, you are doing a great job.. it's helping a lot to quickly prepare for interviews..

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Thanks for the nice words Aniket

  • @Avinashkumar-re8zh
    @Avinashkumar-re8zh3 жыл бұрын

    Nicely explained. We need more videos like this to crack the interview.

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    sure Avinash we will upload it soon....

  • @shamilraj322
    @shamilraj3222 жыл бұрын

    Very clear explanation. Nowadays I became an addict of your videos, it really helping to brush up old things and learn so many new things. Can you please do more videos on Java 8 stream programs.

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks Shamil. Sure we will upload more videos on practical implementation of java 8 features🙂👍

  • @vijayakalgudi9895
    @vijayakalgudi98953 жыл бұрын

    Thank you code decode for these videos.. Would like to see more on Multithreading and synchronization, also sql related interview questions. Thanks again :)

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Sure Vijaya we will plan it and upload it soon...

  • @vijayakalgudi9895

    @vijayakalgudi9895

    3 жыл бұрын

    @@CodeDecode thanks a lot

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    👍👍

  • @devopsexpedition4867
    @devopsexpedition48673 жыл бұрын

    Hi dear. Your videos are very helpful. I shared you videos to my friends. I am experienced in java. But refreshing java theory concepts by your videos. Now am looking for job change and I cleared several technical rounds.

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    That is such a great news that you have cleared many interviews Congratulations man ! Keep learning keep growing :-)

  • @arkaroy1257
    @arkaroy12573 жыл бұрын

    Nicely explained. Ofcourse, we need more detailed interview trending questions.

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Sure we will upload it soon...

  • @coincidentIndia
    @coincidentIndia2 жыл бұрын

    We can use minus (-) in front of compareTo employeeList.stream().map(Employee::getSalary).sorted((e1,e2)->-e1.compareTo(e2)).collect(Collectors.toList()); and if we want the list in Ascending order with unique element use TreeSet while collecting. ie collect(Collection.toCollection(TreeSet::new));

  • @shankardayal6928
    @shankardayal69283 жыл бұрын

    ClassNotFoundException is a checked exception and occurs when the Java Virtual Machine (JVM) tries to load a particular class and the specified class cannot be found in the classpath.

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Checked exceptions are checked at compile time by compiler Shankar. If u have watched the video, can u see any compile time error there!??. Please don't follow blogs blindly man. Please help us if we are wrong but as far as we know, it's runtime.

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    And Jvm comes into picture during runtime and javac is used during compile time 🙂. There is some misunderstanding I believe because u only said Jvm comes into picture in this type of error and jvm comes into picture during runtime n not compile time. Hence u only proved its runtime exception. But nice doubt, it will help people getting their doubts cleared. Thanks 👍👍

  • @shankardayal6928

    @shankardayal6928

    3 жыл бұрын

    @@CodeDecode Java docs is saying ClassNotFoundException is checked because it is child class of Exception class. Any child class of RuntimeException is unchecked. Hope now it is clear. docs.oracle.com/javase/7/docs/api/java/lang/ClassNotFoundException.html

  • @shankardayal6928

    @shankardayal6928

    3 жыл бұрын

    @@CodeDecode At runtime only JVM will check exception of any type. Correct me if wrong

  • @shankardayal6928

    @shankardayal6928

    3 жыл бұрын

    I never want to teach you but I found some mistake thus informed you. You are doing very great job by helping us with this set of questions. Hope you will not take my suggestion in other way 👍👍👍

  • @himanshuchugh2865
    @himanshuchugh28654 ай бұрын

    All your videos are amazing !

  • @CodeDecode

    @CodeDecode

    4 ай бұрын

    Thanks

  • @jskr456
    @jskr4563 жыл бұрын

    as always , excellent work by code decode. good explanation.

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Thanks Shashi 🙏. This means a lot 🙏

  • @tulasiramsunkara
    @tulasiramsunkara3 жыл бұрын

    Excellent explanation. Appreciated your efforts

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Thanks Tulasi....

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

    You can use any class as a hashmap key. Primitives of course are not a class. Key just needs to implement equals and hashmap, even if it's in a bad or illogical way.

  • @shubhisharma3790
    @shubhisharma37903 жыл бұрын

    Very clearly explained. Please add more such scenario based videos.

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Sure Shubhi 🙂🙂👍👍

  • @shraddhawagh5150
    @shraddhawagh51502 жыл бұрын

    Great explained ... Appreciate u r all efforts..kindly make videos on frequently ask questions on java8

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure Shraddha 👍👍

  • @prashantkashyap7623
    @prashantkashyap76233 жыл бұрын

    more questions on streams like groupby functions . Thanks ,

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Sure Prashant 👍👍

  • @rampatil1261
    @rampatil12612 жыл бұрын

    Very useful thank you so much

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks Ram

  • @sreerekhamenon1164
    @sreerekhamenon11642 жыл бұрын

    Excellent explanation.. Keep going..

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks Sreerekha

  • @start1learn-n171
    @start1learn-n1715 ай бұрын

    Tq

  • @gokulaher2476
    @gokulaher24763 жыл бұрын

    Hi! thank you for this video and pl.make more such videos

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    sure gokul we will make it soon......

  • @RajYadav-fy4lm
    @RajYadav-fy4lm3 жыл бұрын

    🔥awesome one 😊

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Thanks Raj.......

  • @StudentTechnique
    @StudentTechnique3 жыл бұрын

    Very well explained that classnotfoundexception and noclassdeferror

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Thanks ......

  • @gautamsnegi27
    @gautamsnegi273 жыл бұрын

    Great video. The password question was mind boggling. How about a real time example of accessing the memory dump and fetching the sensitive data.

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Thanks Gautam. We will try to make video on it....

  • @saaiidubbings1126

    @saaiidubbings1126

    Жыл бұрын

    ​@@CodeDecodestill I have confusion in noclassdef

  • @jean-paulboga8189
    @jean-paulboga81892 жыл бұрын

    Thanks

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    🙂🙂👍

  • @prachi2439
    @prachi24393 ай бұрын

    Hi mam, can you please provide demo of breaking singleton pattern in java

  • @SN-cl2ct
    @SN-cl2ct3 жыл бұрын

    Nice questions, should add interveiw questions more frequently, very helpful. 👍🏼

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    sure Saurabh we will do that ......

  • @SN-cl2ct

    @SN-cl2ct

    3 жыл бұрын

    Should also add videos on Data structure, must do interview questions. Looking forward to it.

  • @ramshah6733
    @ramshah67333 жыл бұрын

    sir, does selectorshub certification helps in interview and what are the selectorshub interview questions?

  • @greeshmaA08
    @greeshmaA083 жыл бұрын

    Nice explanation. Please make a video on all the remaining operations like forEach, reverse etc.

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Sure Greeshma .... we will create one soon

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

    if we are making instance as private in singleton class how can we access that in main class to change it's reference?

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

    Nice tutorial, consider using the eclipse vim plugin.

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks Sure 👍

  • @sureshgarine
    @sureshgarine3 жыл бұрын

    Thank you Madam! can you please create a video on each topic reflection, serialization and cloning breaking the sinlgeton design pattern as well

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Sure Suresh 👍👍

  • @phanimadhuri4087
    @phanimadhuri40873 жыл бұрын

    Good Info.

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Thanks

  • @shobhitagarwal8151
    @shobhitagarwal81513 жыл бұрын

    Please make a video on spring security and API gateway . Also, I am up for ways of making singleton design pattern more detailed in video.

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Sure 👍👍

  • @vndprasadgrandhi7024
    @vndprasadgrandhi70243 жыл бұрын

    Hi very helpful video. Thanks for creating for us. Recently, I faced interview. Interviewer asked get the 2nd highest salary of employee using streams. Please let me know

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Sure 👍👍

  • @sweetibharati3260
    @sweetibharati32603 жыл бұрын

    I would like to know more about Java 8 interview questions ,it will be nice if u cover them

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Sure sweeti we will cover it soon

  • @venkatasaikrishnak6984
    @venkatasaikrishnak69843 жыл бұрын

    Could you please create more and more videos...all possible questions of Java8

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Sure Venkata 👍👍

  • @sreejak6776
    @sreejak67763 жыл бұрын

    We need more of these and demo too

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    sure sreeja we will upload it soon....

  • @ghostneguz
    @ghostneguz3 жыл бұрын

    Please provide the java code for breaking Singleton patter. Will be really helpful

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Sure 🙂👍 we will create that soon 👍👍

  • @vishaljain9634

    @vishaljain9634

    3 жыл бұрын

    Use reflection

  • @hemapriyaammu7365
    @hemapriyaammu73653 жыл бұрын

    In what scenario we will use singleton? What’s the use of it ?

  • @AashishSahu.9
    @AashishSahu.93 жыл бұрын

    nice expiation I faced all these questions in my interviews

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Yeah, we too once upon a time. Hence we decided to cover it 👍👍

  • @archfitness2399

    @archfitness2399

    3 жыл бұрын

    Yes, today I stucked in my interview 😭😭

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    No worries, don't be disheartened. Its a part of professional journey. We all have faced rejections and then what we get is the best. All the best man. You deserve much more 👍👍

  • @devopsexpedition4867

    @devopsexpedition4867

    3 жыл бұрын

    @@archfitness2399 don't worry dear. Interview is also an experience. After few interviews we will be confident to answer the questions.

  • @saurabhmantri8573
    @saurabhmantri85733 жыл бұрын

    In Java 8 example, can we use first map with salary and then Comparator.reverseorder() method directly instead of expression ? Btw thanks for the video :)

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Yes Saurabh we can do that. There ae multiple ways to do that👍👍

  • @CoolBruce100

    @CoolBruce100

    2 жыл бұрын

    map() will give you list of salary and you'll be sorting that.. We need the list of Employee and not list of Employee's salary. I hope it is making sense.

  • @riteshranjan5221
    @riteshranjan52212 жыл бұрын

    Please add more question on java 8 stream programing that mainly asked during interviews.....

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure Ritesh 👍👍🙂🙂

  • @SaiTeja-ym2er
    @SaiTeja-ym2er2 жыл бұрын

    Thanks for sharing knowledge. Could you please make more videos on collections program. one of interviewer asked me, fetch the employees who located at Mumbai city. please explain this one. if possible.

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure Sai. We will cover it 🙂👍

  • @parthibankalimuthu2584
    @parthibankalimuthu25842 жыл бұрын

    Pls share all the interview questions and answers in notes..it will helpful to others

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure 👍

  • @computerknowledgeful
    @computerknowledgeful3 жыл бұрын

    Thanks mam

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    👍👍🙂🙂

  • @debpriyasaha4804
    @debpriyasaha48043 жыл бұрын

    I was asked what is the difference between singleton design pattern of java and that of spring?

  • @virajnaik102

    @virajnaik102

    2 жыл бұрын

    Spring create singleton object per ApplicationContext. If you have more than one ApplicationContext in your project Spring will create more than one object. In contrast Java Singleton object is created per JVM.

  • @amhar5677
    @amhar56772 жыл бұрын

    I need more interview questions on Java 8 such as flat map,map,optional etc

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    kzread.info/head/PLyHJZXNdCXsdeusn4OM33415DCMQ6sUKy

  • @sushmakolli1119
    @sushmakolli11193 жыл бұрын

    Please provide the complete demonstration of how to break singleton design pattern with code it will be helpful.

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    sure Sushma we will provide one soon

  • @sushmakolli1119

    @sushmakolli1119

    3 жыл бұрын

    And also cover more interview questions based on streams(java8).

  • @yaminin6487
    @yaminin64873 жыл бұрын

    Java 8 interview questions with map and flatmap and intermediate streams and parallel streams

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    sure Yamini we will upload it soon...

  • @priyanka0112
    @priyanka01123 жыл бұрын

    Please include More Java 8 coding questions like this

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Sure Priyanka. Thanks for writing back 👍👍

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

    Please do make more vedios on Java 8 coding questions

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Sure we will create more videos soon

  • @rajyalakshmitammineedi8662
    @rajyalakshmitammineedi86622 жыл бұрын

    Please make a vedio on how to break single ton using executor

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    sure rajylakhsmi we will plan and upload it soon.

  • @Akki31
    @Akki313 жыл бұрын

    Please upload video on java stream api example for all the methods

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Sure Akshay, will do that 👍

  • @lakshmaiahyannagiri291
    @lakshmaiahyannagiri2912 жыл бұрын

    Hi it's was very nice where we can find your code . please share me the link java 8 program interview part questions

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Every thing about java 8 is here kzread.info/head/PLyHJZXNdCXsdeusn4OM33415DCMQ6sUKy

  • @tataapparao7935
    @tataapparao79353 жыл бұрын

    Clear create the demo session for break singleton pattern

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    sure we will create it soon

  • @tataapparao7935

    @tataapparao7935

    3 жыл бұрын

    @@CodeDecode thanks for your reply

  • @hemapriyaammu7365
    @hemapriyaammu73653 жыл бұрын

    Can please make a video on junit testcases

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    sure we will plan and make video on that

  • @rishiraj2548
    @rishiraj25483 ай бұрын

    🙂👍

  • @shyamsanghvi4410
    @shyamsanghvi44103 жыл бұрын

    Want every interview questions related to java 8

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    sure Shyam we will upload it soon....

  • @rajyalakshmitammineedi8662
    @rajyalakshmitammineedi86622 жыл бұрын

    Please

  • @koppulanaveenraddy4822
    @koppulanaveenraddy48223 жыл бұрын

    Not able view code clearly.please zoom in more

  • @CodeDecode

    @CodeDecode

    3 жыл бұрын

    Thanks for the observation 👍👍🙂🙂. We did it in next video

  • @nooruddinraotiwala353
    @nooruddinraotiwala3535 ай бұрын

    Nicely and perfectly crafted library thanks for sharing, I would suggest updating this library with new latest questions or I would like to share some new question bank as I have over 100+ new questions relevant to these recent year share me your email id to sent your way!!!

Келесі