Java Interview Questions And Answers | Java Programming Interview Questions And Answers |Simplilearn

Sdílet
Vložit
  • čas přidán 28. 06. 2024
  • 🔥Full Stack Developer (MERN Stack): www.simplilearn.com/full-stac...
    🔥Full Stack Java Developer (Masters): www.simplilearn.com/java-full...
    🔥Caltech Coding Bootcamp(US Only): www.simplilearn.com/coding-bo...
    Get the top Java Interview Questions And Answers to ace your job interview and excel your career as a Java Developer. Let's begin!
    This video is based on the most frequently asked Java Interview Questions and Answers. This video explains all the corporate level Java Interview Questions and Answers in detail to help beginners in a theoretical way for a better learning experience. Below are some of the Java interview questions answered in the video:
    0:00 Java interview questions
    01:33 What is JIT?
    01:39 What is a ClassLoader?
    01:10 What are the memory allocations available in Java?
    02:37 Will the program run if I write static public void main?
    03:13 What is the default value stored in local variables?
    04:19 What is the output of the following code segment?
    06:36 What is an Association?
    07:58 Define copy constructor in Java
    08:39 What is a Marker Interface?
    09:16 What is object cloning?
    10:06 Why is Java not completely object-oriented?
    10:37 Define wrapper classes in Java
    11:23 Define singleton classes in Java
    11:48 Define package in Java
    13:20 Can you implement pointers in a Java program?
    14:18 Differentiate between instance and local variables
    14:58 Explain Java string pool
    15:49 What is an Exception?
    17:15 What is a final keyword in Java?
    18:06 What happens when main() isn't declared as static?
    🔥Enrol for FREE Java Programming course & Get your Completion Certificate: www.simplilearn.com/learn-jav...
    ✅Subscribe to our Channel to learn more about the top Technologies: bit.ly/2VT4WtH
    ⏩ Check out the Java Programming training videos: bit.ly/31erBEK
    #JavaInterviewQuestionAndAnswers #JavaProgrammingInteriewQuestionsAndAnswers #JavaInterviewQuestions #Java #JavaDeveloperInteriew #JavaProgrammingForBeginners #simplilearn
    What is Java?
    Java is an object-oriented, class-based, high-level programming language used for software development, mobile application development, website development, desktop application development, and much more. Java is one of the leading and in-demand programming languages in the current IT industry.
    ➡️ About Post Graduate Program In Full Stack Web Development
    This program will give you the foundation for building full-stack web apps using the Java programming language. You'll begin with the basics of JavaScript, and then venture into some of the more advanced concepts like Angular, Spring Boot, Hibernate, JSPs, and MVC. Now is the perfect time to get started on your career as a full-stack web developer!
    ✅ Key Features
    - Caltech CTME Post Graduate Certificate
    - Enrolment in Simplilearn’s JobAssist
    - Receive up to 25 CEUs from Caltech CTME
    - Simplilearn's JobAssist helps you get noticed by top hiring companies
    - Attend Masterclasses from Caltech CTME instructors
    - Live virtual classes led by industry experts, hands-on projects and integrated labs
    - Online Convocation by Caltech CTME Program Director
    - 20 lesson-end and 5 phase-end projects
    - Capstone Project in 4 domains
    - Caltech CTME Circle Membership
    - Build your own portfolio on GitHub
    ✅ Skills Covered
    - Agile
    - JAVA
    - Hibernate and JPA
    - Spring Core 50
    - DevOps
    - HTML5 and CSS3
    - AWS
    - JavaScript ES6
    - Servlets
    - SOAP and REST
    - JSP
    👉 Learn More At: www.simplilearn.com/pgp-full-...
    🔥🔥 Interested in Attending Live Classes? Call Us: IN - 18002127688 / US - +18445327688

Komentáře • 107

  • @SimplilearnOfficial
    @SimplilearnOfficial  Před 2 měsíci +1

    🔥Full Stack Developer (MERN Stack): www.simplilearn.com/full-stack-developer-course-mern-certification-training?IsAF5I&
    🔥Full Stack Java Developer (Masters): www.simplilearn.com/java-full-stack-developer-certification?JavaIQS--rw8iIsAF5I&
    🔥Caltech Coding Bootcamp(US Only): www.simplilearn.com/coding-bootcamp?JavaIQS--rw8iIsAF5I&

  • @DEEPAKKUMAR-xs8td
    @DEEPAKKUMAR-xs8td Před 2 lety +67

    Q.28. We can overload static method . As overloading happens at compile time and static method binds at compile time So we can overload static method.
    public class StaticMethodOverloading {
    static void display(int a){
    System.out
    .println("Value of a : "+a);
    }
    static void display(int a,int b){
    System.out.println("Value of a: "+a+" And value of b: "+b);
    }
    static public void main(String[] args){
    display(5);
    display(7,9);
    }
    }
    Above example will be complied without any error

  • @SimplilearnOfficial
    @SimplilearnOfficial  Před 2 lety +11

    🔥 IITM Pravartak Professional Certificate Program In Full Stack Development - MERN (India Only): www.simplilearn.com/full-stack-developer-course-and-certification-iitm-pravartak?SCE-FullstackIITM&Comments&
    🔥Post Graduate Program In Full Stack Web Development: www.simplilearn.com/pgp-full-stack-web-development-certification-training-course?JavaIQS--rw8iIsAF5I&Comments&
    🔥Caltech Coding Bootcamp(US Only): www.simplilearn.com/coding-bootcamp?JavaIQS--rw8iIsAF5I&Comments&

  • @sainath7661
    @sainath7661 Před 3 lety +127

    Q 22: please check the difference between public and default access specifiers. Default members are not accessible outside the package whereas public members are accessible from anywhere.

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 3 lety +4

      Thank you for bringing this to our attention! We'll let the respective department know. Thank you for watching!

  • @SimplilearnOfficial
    @SimplilearnOfficial  Před 3 lety +1

    Interested in programming? Here is your one-stop destination to kick-start your programming journey for Free! Subscribe to our new channel #SimpliCode : bit.ly/3eGepgQ

  • @surajtopal9940
    @surajtopal9940 Před 3 lety +99

    Q27 : - Method Overloading there is one error - Varying the return type of the method . But overloading is not depend on return type. It is depend on data of parameter and as well as no. of parameter.

  • @gbird373
    @gbird373 Před 2 lety +64

    Toooo many wrong answers!!

  • @delta4v
    @delta4v Před 3 lety +112

    I found beginners question harder than intermediate 🤔

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 3 lety +4

      Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!

  • @kishorekumar8100
    @kishorekumar8100 Před 2 lety +24

    Q27. varying the return type doesn't lead to Method overloading as you can't have two methods with the same signature(parameters, type of params, and order) and have different return types. This is because if it's possible, this leads to ambiguity at run time, and JVM doesn't know which method to call.
    Please correct it. Great job otherwise!!

  • @nikhilparakh5297
    @nikhilparakh5297 Před 2 lety +13

    Your choice of questions are very accurate but you missed few oops concepts, this video is really helpful. And I am glad I found your video.
    Thanks and thumbs up from myside.

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 2 lety

      Thank you for the appreciation. You can check our videos related to various technologies and subscribe to our channel to stay updated with all the trending technologies.

  • @javaInBlood
    @javaInBlood Před 3 lety +19

    We can overload static method but we can't override static method

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 3 lety +1

      Thank you for letting us know know about this. Your feedback helps us get better. We are looking into this issue and hope to resolve it promptly and accurately.

    • @brahmadutts5639
      @brahmadutts5639 Před 3 lety +10

      @@SimplilearnOfficial But you didn’t correct it yet.

  • @shikhapandey9343
    @shikhapandey9343 Před 2 lety +27

    Q13: correction:- constructor is made private so that no one can create object out of it. You provide public static method which returns instance of singleton class.

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 2 lety +1

      Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!

  • @prakashp1970
    @prakashp1970 Před rokem +2

    Answer of 28 question is yes, we can overload static method

  • @javaInBlood
    @javaInBlood Před 3 lety +11

    Question no -27 wrong explaination In overloading compiler doesn't consider return type of method.(it gives Compile time error)

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 3 lety

      Hi Mahesh, Thanks for the feedback. We shall share your concerns with the concerned department.

  • @willburghard966
    @willburghard966 Před 5 měsíci +2

    good video... but the beginner questions are harder than the intermediate questions.

  • @gener6995
    @gener6995 Před 3 lety +11

    Great!!! please include collection questions too

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 3 lety +1

      Hey, thank you for watching our video. We will definitely look into your suggestions. Do subscribe and stay tuned for updates on our channel. Cheers :)

  • @UnprivilegedDelhi
    @UnprivilegedDelhi Před 3 lety +15

    please correct Q. 5
    Java Global variables have the default values for primitive types.
    boolean false 1 bit
    char '\u0000' 2 byte
    byte 0 1 byte
    short 0 2 byte
    int 0 4 byte
    long 0L 8 byte
    float 0.0f 4 byte
    double 0.0d 8 byte

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 3 lety +2

      Thank you for bringing this to our attention. We’re sorry you had a bad experience. We’ll strive to do better

  • @rishibharadwaj68
    @rishibharadwaj68 Před 3 lety +14

    Questions are good but you need to further validate on the answers to many questions.

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 3 lety

      Thanks for bring this to our attention. We'll try to do better in upcoming videos. Thank you for watching!

    • @smk2SOA
      @smk2SOA Před 3 lety

      Exactly 💯correct

  • @vishwabharati3440
    @vishwabharati3440 Před 3 lety +1

    Excellent way of explination, i searched many video with simple explination but here i got.....

  • @chepyala9
    @chepyala9 Před 2 lety +6

    Hi Simplilearn Team, very well explained. Thanks. Can you please share the document or share the link to download it. That would be very helpful

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 2 lety

      Hello, thanks for viewing our tutorial. You can find your requested dataset in the video description. Hope that helps.

    • @chepyala9
      @chepyala9 Před 2 lety

      @@SimplilearnOfficial Thanks.

    • @OracleLand_Official
      @OracleLand_Official Před 2 lety

      Watch full collections interview questions here part 10 to 15.....

  • @sagar8257
    @sagar8257 Před 3 lety +2

    Great job!!!

  • @sreejithvignesh192
    @sreejithvignesh192 Před 2 lety +4

    Q27: Method overloading cannot be done with return type modification. Please check and update in the video

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 2 lety

      Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!

  • @matthiasmoser6096
    @matthiasmoser6096 Před 2 lety +19

    Please note that in Q1, you read "Java-in-Time Compiler", while your text correctly stated "Just-in -Time Compiler".

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 2 lety

      Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!

    • @2626adnan1
      @2626adnan1 Před 2 lety +3

      and then he said Java interpreter instead of compiler.

  • @ashutoshchaurasia2972
    @ashutoshchaurasia2972 Před 3 lety +22

    In Java all local variable have default values. Number variable have 0, boolean habe have false and object reference have null as default values. Variable declared in method needs to be Initialized which are by default final.

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 3 lety

      Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!

  • @ajinkyajagtap1651
    @ajinkyajagtap1651 Před 2 lety +8

    Q.28: Can we overload a static method?
    Correct answer is: Yes

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 2 lety

      Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!

  • @mdzikrullah9575
    @mdzikrullah9575 Před 2 lety +20

    Correction : We can overload a static method.

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 2 lety +2

      Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!

    • @nilesh9686
      @nilesh9686 Před 2 lety +2

      Right👍🏻
      We can't override static method

    • @tanajipatilchandolkar576
      @tanajipatilchandolkar576 Před 2 lety +2

      In which jdk version we can overload static method

  • @harishkummara767
    @harishkummara767 Před 3 lety +4

    Nice information thanks a lot ☺️

  • @dvp7388
    @dvp7388 Před 10 měsíci +1

    Thanks for a very informative video

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 10 měsíci

      We're thrilled to have been a part of your learning experience, and we hope that you feel confident and prepared to take on new challenges in your field. If you're interested in further expanding your knowledge, check out our course offerings in the description box.

  • @aazaa7334
    @aazaa7334 Před 2 lety +11

    IDE stands for Integrated Development Environment not Integrated Development Enterprise. Nice set of questions but very careless errors.

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 2 lety

      Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!

  • @sreelakshmips2581
    @sreelakshmips2581 Před 2 lety +1

    Thank you so much

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 2 lety

      Hope you enjoyed our video! We have a ton more videos like this on our channel. We hope you will join our community!

  • @rahulwasatkar4363
    @rahulwasatkar4363 Před rokem +1

    q 28 : you says like static method can not overload .. but we can overload the static method . but we cannot overload two methods in Java if they differ only by static keyword (number of parameters and types of parameters is the same).

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před rokem

      The answer is 'Yes'. We can have two or more static methods with the same name, but differences in input parameters The question was focused on having static methods with same parameters

  • @sreekanthvadassery8288
    @sreekanthvadassery8288 Před 2 lety +3

    A static method can be overloaded, but can not be overridden in Java. Correct your answer please.

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 2 lety

      Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!

  • @aniruddhadhandar530
    @aniruddhadhandar530 Před rokem +1

    JDBC is an abbreviation for "Java Database Connectivity", not a connector.

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před rokem

      Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!

  • @bloom6874
    @bloom6874 Před rokem

    too good ☺💖

  • @bodymurat
    @bodymurat Před 3 lety +1

    Q24 - is wrong wording too. This makes an access to stuff from the current instance, not the „class“. Accessing stuff from the class would be more like static properties.

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 3 lety

      Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!

  • @banothsrinu6577
    @banothsrinu6577 Před 3 lety

    Thank you

  • @tomaskonig4930
    @tomaskonig4930 Před 3 lety +5

    Question 28 wrong, we can overload static method we cant oweride it

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 3 lety

      Thank you for letting us know know about this. Your feedback helps us get better. We are looking into this issue and hope to resolve it promptly and accurately.

  • @singing_reels
    @singing_reels Před 2 lety +2

    Nice.......

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 2 lety

      Keep learning with us .Stay connected with our channel and team :) . Do subscribe the channel for more updates : )

  • @BABABENNETT
    @BABABENNETT Před rokem +2

    Awesome

  • @thegodfatheram
    @thegodfatheram Před 2 lety

    thanks alot

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 2 lety

      Your support means a lot to us and it motivated us to create even better learning content and courses experience for you.

  • @petersouthwell5971
    @petersouthwell5971 Před 5 měsíci

    Why did you overlook discussing modules when talking about packages?

  • @khushansharora3383
    @khushansharora3383 Před měsícem

    33:59 advanced questions

  • @Chosenn1
    @Chosenn1 Před rokem +3

    Get more assistance in comments section than Video..!!
    Thanks !

  • @chetanborse339
    @chetanborse339 Před 3 lety +3

    Hello ! I want to ask one question which computer field will make me earn more in the starting of my career

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 3 lety +3

      Hi Chetan, we suggest you to go for AI or Data Science since they are booming currently. Do subscribe to our channel and get our new video updates directly into your email.

  • @ThePrinceUK
    @ThePrinceUK Před 3 lety +4

    Q22 answer is wrong. Private definition is incorrect and Protected is not more secure than private.

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 3 lety

      Thank you for letting us know know about this. Your feedback helps us get better. We are looking into this issue and hope to resolve it promptly and accurately.

  • @TomarSahab
    @TomarSahab Před 3 lety +4

    one tip : ignore the third section

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 3 lety

      Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!

  • @anilabaladas1535
    @anilabaladas1535 Před 2 lety

    i wish you could give example and explain

  • @Suirady
    @Suirady Před 2 lety +3

    This video is full of errors, will create more confusion to begginers instead of actually helping out! Choose your information carefully

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 2 lety

      Hi, sorry to hear that. Could you please explain a bit more on what has gone wrong. So that we can convey it to the concerned team. Thanks!

  • @sremonkarmakar2715
    @sremonkarmakar2715 Před rokem +1

    java automatically allocate memory.

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před rokem

      Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!

  • @siddheshgarge4329
    @siddheshgarge4329 Před 3 lety +2

    We can overload static method.

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 3 lety

      Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!

    • @jerinjoseph6837
      @jerinjoseph6837 Před 3 lety

      Yes

  • @stevanhartig5573
    @stevanhartig5573 Před rokem +3

    I do not know who did this video, but it has so much wrong informations.

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před rokem

      Thank you for bringing this to our attention. We’re sorry you had a bad experience. We’ll strive to do better

  • @smk2SOA
    @smk2SOA Před 3 lety +3

    No sample or examples provided. Only definition. No use of this video session

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 3 lety

      Thank you for bringing this to our attention. We’re sorry you had a bad experience. We’ll strive to do better

  • @renugas3162
    @renugas3162 Před 2 lety +1

    Can you share the ppt

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 2 lety

      We don't have any pdf of this particular video. For slides, you can check out our slideshare profile: www.slideshare.net/Simplilearn"

    • @renugas3162
      @renugas3162 Před 2 lety

      @@SimplilearnOfficial ok sir

  • @garkman5000
    @garkman5000 Před 2 lety +8

    This video has many inaccuracies. I do not recommend anyone watch it to prepare for interviews.
    Some problems I saw before I stopped watching
    1) Singelton classes were not properly explained at all. This is a bigger subject than I can cover here.
    2) Access modifiers were very poorly explained. The most important one on there from the standpoint of an interviewer trying to see if you really know your material (IMO) is the protected modifier. Only a hand waving explanation was given in the video. In essence inheriting classes from OTHER packages can access (unlike package private)
    3) Method overloading was flat wrong. The return signature DOES NOT MATTER. Try it yourself, declare two functions with the same method parameters and different return types.
    4) Static method overloading, this was really poorly described and I think the speaker was confused himself. You cannot overload a static method with an instance method with the same method signature (ie write the same method, except put a static keyword in one). You can however have two static methods with different method signatures (ie parameters).
    I stopped watching after overloading. You are better off passing on this video, rather than learning incorrect information.

    • @SimplilearnOfficial
      @SimplilearnOfficial  Před 2 lety

      Thank you for your review. We are sorry to hear you had such a frustrating experience, but we really appreciate you bringing this issue to our attention

  • @vinodmahato2505
    @vinodmahato2505 Před 2 lety +6

    lot of wrong answers 🙄