Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| ||||
Core Java - Interview Questions and Answers for 'Compilation' - 7 question(s) found - Order By Newest | ||||
| ||||
Ans. No. It will give the compilation error saying "The abstract method test in type BuggyBread1 can only be defined by an abstract class". We need to declare the class abstract for it to have any abstract method. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   oops   abstract class   abstract methods   java compilation error | ||||
| ||||
Ans. No. This will give a compilation error saying "Abstract methods do not specify a body". | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   abstract classes   abstract methods   java compilation error   java coding   java code   coding   yes-no | ||||
| ||||
Ans. Java Source Code File | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  compilation unit in java | ||||
| ||||
Ans. Compilation is the process of converting Java source files to class files which can be executed by the Java runtime environment whereas Decompilation is the process of converting class files back to the Java Source code. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  compilation vs decompilation  compiler vs decompiler | ||||
| ||||
Ans. OuterClass.class AND OuterClass$InnerClass.class | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  class files  compilation  compile  inner classes   nested classes | ||||
| ||||
Ans. No without main method can not be executed it will throw an error illegal start of type. Main method is the entry point of application. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  jvm  compilation  main method Basic | ||||
| ||||
Ans. 1 Reason being that Class1.xyz is replaced with 1 during pre compilation only and a reference to Class1 is never made. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  static final   pre compilation | ||||