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

Поделиться
HTML-код
  • Опубликовано: 16 июл 2024
  • 🔥Full Stack Developer (MERN Stack) - l.linklyhq.com/l/1yhx4
    🔥Full Stack Java Developer (MEAN): l.linklyhq.com/l/1yhxA
    🔥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

Комментарии • 108

  • @SimplilearnOfficial
    @SimplilearnOfficial  3 месяца назад +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 2 года назад +68

    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

  • @sainath7661
    @sainath7661 3 года назад +128

    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  3 года назад +4

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

  • @gbird373
    @gbird373 2 года назад +68

    Toooo many wrong answers!!

  • @surajtopal9940
    @surajtopal9940 3 года назад +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.

  • @delta4v
    @delta4v 3 года назад +114

    I found beginners question harder than intermediate 🤔

    • @SimplilearnOfficial
      @SimplilearnOfficial  3 года назад +4

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

  • @kishorekumar8100
    @kishorekumar8100 3 года назад +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!!

  • @ajinkyajagtap1651
    @ajinkyajagtap1651 2 года назад +8

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

    • @SimplilearnOfficial
      @SimplilearnOfficial  2 года назад

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

  • @nikhilparakh5297
    @nikhilparakh5297 2 года назад +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  2 года назад

      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.

  • @mdzikrullah9575
    @mdzikrullah9575 2 года назад +20

    Correction : We can overload a static method.

    • @SimplilearnOfficial
      @SimplilearnOfficial  2 года назад +2

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

    • @nilesh9686
      @nilesh9686 2 года назад +2

      Right👍🏻
      We can't override static method

    • @tanajipatilchandolkar576
      @tanajipatilchandolkar576 2 года назад +2

      In which jdk version we can overload static method

  • @javaInBlood
    @javaInBlood 3 года назад +11

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

    • @SimplilearnOfficial
      @SimplilearnOfficial  3 года назад

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

  • @UnprivilegedDelhi
    @UnprivilegedDelhi 3 года назад +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  3 года назад +2

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

  • @shikhapandey9343
    @shikhapandey9343 2 года назад +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  2 года назад +1

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

  • @javaInBlood
    @javaInBlood 3 года назад +19

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

    • @SimplilearnOfficial
      @SimplilearnOfficial  3 года назад +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 3 года назад +10

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

  • @rishibharadwaj68
    @rishibharadwaj68 3 года назад +15

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

    • @SimplilearnOfficial
      @SimplilearnOfficial  3 года назад

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

    • @smk2SOA
      @smk2SOA 3 года назад

      Exactly 💯correct

  • @prakashp1970
    @prakashp1970 Год назад +2

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

  • @gener6995
    @gener6995 3 года назад +11

    Great!!! please include collection questions too

    • @SimplilearnOfficial
      @SimplilearnOfficial  3 года назад +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 :)

  • @willburghard966
    @willburghard966 5 месяцев назад +2

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

  • @sreejithvignesh192
    @sreejithvignesh192 2 года назад +4

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

    • @SimplilearnOfficial
      @SimplilearnOfficial  2 года назад

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

  • @chepyala9
    @chepyala9 3 года назад +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  3 года назад

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

    • @chepyala9
      @chepyala9 3 года назад

      @@SimplilearnOfficial Thanks.

    • @OracleLand_Official
      @OracleLand_Official 2 года назад

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

  • @sagar8257
    @sagar8257 3 года назад +2

    Great job!!!

  • @matthiasmoser6096
    @matthiasmoser6096 2 года назад +19

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

    • @SimplilearnOfficial
      @SimplilearnOfficial  2 года назад

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

    • @2626adnan1
      @2626adnan1 2 года назад +3

      and then he said Java interpreter instead of compiler.

  • @vishwabharati3440
    @vishwabharati3440 3 года назад +1

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

  • @ashutoshchaurasia2972
    @ashutoshchaurasia2972 3 года назад +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  3 года назад

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

  • @rahulwasatkar4363
    @rahulwasatkar4363 Год назад +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  Год назад

      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 2 года назад +3

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

    • @SimplilearnOfficial
      @SimplilearnOfficial  2 года назад

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

  • @SimplilearnOfficial
    @SimplilearnOfficial  2 года назад +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&

  • @dvp7388
    @dvp7388 11 месяцев назад +1

    Thanks for a very informative video

    • @SimplilearnOfficial
      @SimplilearnOfficial  11 месяцев назад

      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 2 года назад +11

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

    • @SimplilearnOfficial
      @SimplilearnOfficial  2 года назад

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

  • @ChoovioHopi
    @ChoovioHopi 13 дней назад

    Wow, it's really nice. It's very attractive

  • @tomaskonig4930
    @tomaskonig4930 3 года назад +5

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

    • @SimplilearnOfficial
      @SimplilearnOfficial  3 года назад

      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.

  • @sreelakshmips2581
    @sreelakshmips2581 2 года назад +1

    Thank you so much

    • @SimplilearnOfficial
      @SimplilearnOfficial  2 года назад

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

  • @harishkummara767
    @harishkummara767 3 года назад +4

    Nice information thanks a lot ☺️

  • @banothsrinu6577
    @banothsrinu6577 3 года назад

    Thank you

  • @bloom6874
    @bloom6874 Год назад

    too good ☺💖

  • @zomzhack
    @zomzhack 2 года назад +2

    Nice.......

    • @SimplilearnOfficial
      @SimplilearnOfficial  2 года назад

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

  • @BABABENNETT
    @BABABENNETT Год назад +2

    Awesome

  • @bodymurat
    @bodymurat 3 года назад +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  3 года назад

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

  • @thegodfatheram
    @thegodfatheram 2 года назад

    thanks alot

    • @SimplilearnOfficial
      @SimplilearnOfficial  2 года назад

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

  • @aniruddhadhandar530
    @aniruddhadhandar530 Год назад +1

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

    • @SimplilearnOfficial
      @SimplilearnOfficial  Год назад

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

  • @chetanborse339
    @chetanborse339 3 года назад +3

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

    • @SimplilearnOfficial
      @SimplilearnOfficial  3 года назад +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.

  • @SimplilearnOfficial
    @SimplilearnOfficial  3 года назад +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

  • @ThePrinceUK
    @ThePrinceUK 3 года назад +4

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

    • @SimplilearnOfficial
      @SimplilearnOfficial  3 года назад

      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.

  • @Chosenn1
    @Chosenn1 Год назад +3

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

  • @petersouthwell5971
    @petersouthwell5971 6 месяцев назад

    Why did you overlook discussing modules when talking about packages?

  • @TomarSahab
    @TomarSahab 3 года назад +4

    one tip : ignore the third section

    • @SimplilearnOfficial
      @SimplilearnOfficial  3 года назад

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

  • @khushansharora3383
    @khushansharora3383 2 месяца назад

    33:59 advanced questions

  • @anilabaladas1535
    @anilabaladas1535 2 года назад

    i wish you could give example and explain

  • @Suirady
    @Suirady 2 года назад +3

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

    • @SimplilearnOfficial
      @SimplilearnOfficial  2 года назад

      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!

  • @stevanhartig5573
    @stevanhartig5573 2 года назад +3

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

    • @SimplilearnOfficial
      @SimplilearnOfficial  2 года назад

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

  • @sremonkarmakar2715
    @sremonkarmakar2715 2 года назад +1

    java automatically allocate memory.

    • @SimplilearnOfficial
      @SimplilearnOfficial  2 года назад

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

  • @smk2SOA
    @smk2SOA 3 года назад +3

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

    • @SimplilearnOfficial
      @SimplilearnOfficial  3 года назад

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

  • @siddheshgarge4329
    @siddheshgarge4329 3 года назад +2

    We can overload static method.

    • @SimplilearnOfficial
      @SimplilearnOfficial  3 года назад

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

    • @jerinjoseph6837
      @jerinjoseph6837 3 года назад

      Yes

  • @renugas3162
    @renugas3162 2 года назад +1

    Can you share the ppt

    • @SimplilearnOfficial
      @SimplilearnOfficial  2 года назад

      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 2 года назад

      @@SimplilearnOfficial ok sir

  • @garkman5000
    @garkman5000 2 года назад +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  2 года назад

      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 2 года назад +6

    lot of wrong answers 🙄