Top 10 JAVA Interview Questions and Answers

preview_player
Показать описание
Questions covered in this video are
1) Can we declare a class as Abstract without having any abstract method?
2) What are the performance implications of Interfaces over abstract classes?
3) Does Importing a package imports its sub-packages as well in Java?
4) When a lot of changes are required in data, which one should be a preference to be used? String or StringBuffer?
5) A person says that he compiled a java class successfully without even having a main method in it? Is it possible?
6) Can we call a non-static method from inside a static method?
7) Can a dead thread be started again?
8) Can we use goto in Java to go to a particular line?
9) Is it possible to define a method in Java class but provide its implementation in the code of another language like C?
10) Can we have any other return type than void for main method?
Above will help both experienced and freshers to crack interviews.
Like, share and subscribe our channel for more videos.

THANKS! We appreciate you reading this and hope you have a wonderful day!

Sincerely,
Guru99
Рекомендации по теме
Комментарии
Автор

Video will be better if you remove the animation.

nirmalantony
Автор

Good content but the animations make it too hard to read and are honestly just obnoxious

morkroth
Автор

I loved the animations after a couple of drinks...

uybabayun
Автор

#8 - Not the exact same, but you can label a loop and use continue inside that loop to tell which loop you want to start executing again (mostly use inside nested loops).

chanthien
Автор

Awesome Video..:) Thanksand keep uploading..xD.. And for those who are troubled by animation .-> We can pause the video whenever we want !

deekshantmalvi
Автор

Failed with 8 question. Java keyword list specifies the goto keyword, but it's marked as "not used" and not implemented. You cant use this keyword in your program.

AlexSmith-oepr
Автор

There is goto keyword in java, but it has no use. And if you mention StringBuffer - it's good to mention StringBuilder as well.

raymints
Автор

Thanx for the video. It was nicely explained.

joydas
Автор

can anyone give me an example of an Indirection for Interfaces? Could not find a quick relevant example online. Thank you

GabrielPatroi
Автор

It's also worth noting that the question about interfaces vs. abstract classes is somewhat misleading; it mentions that all methods in the interface have to be implemented by classes implementing the interface. But the same goes for Abstract classes as well, and that isn't mentioned, making it seem like a (false) comparison.

franksmith
Автор

Thanks for the video. In my personal experience I would like the video to have no music and animation.
And at the end your G logo stay on top of the answer.

Keep the good work
Thanks again

YouPinguim
Автор

5) It can be run, but not as a stand alone application. It has to be used as a dependency

nemanjab
Автор

Regarding question 10. you can return any type by the main method. main is a method just similar to any another method

ismailakbari
Автор

what is "object" class in java. is it superclass of component class?

nitin
Автор

Thank you for the video and PLEASE don't use this animation ever again!

rymchebbi