Where must all program code be written in Java?
AIn global scopes
BIn source headers
CIn binary modules
DInside classes
Answer & Solution
Correct answer: D. Inside classes
All program code in Java is required to be written inside classes.
Keep practising Introduction to Java and BlueJ
Browse all Introduction to Java and BlueJ questions for ICSE Class 8, or explore more Computer Applications topics.
Related questions
Match each Java language feature with its benefit:Match each object-oriented programming concept with its definition:Match each BlueJ IDE interface element with its purpose:Match each core Java platform component with its role:Which framework lets Java interact with native C/C++ libraries?When does the JVM bytecode verifier check bytecode?Which class loader in every JVM must load trusted classes?Which activity strictly follows loading in a JVM class loader?