Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
1.5k views
in Programming by (103k points)
closed by

Which of the following statements is/are TRUE regarding JAVA ?

(a) Constants that cannot be changed are declared using the ‘static’ keyword.

(b) A class can only inherit one class but can implement multiple interfaces.


1. Only (a) is TRUE
2. Only (b) is TRUE.
3. Both (a) and (b)are TRUE
4. Neither (a) nor (b) is TRUE

1 Answer

0 votes
by (106k points)
selected by
 
Best answer
Correct Answer - Option 2 : Only (b) is TRUE.

The correct answer is option 2. 

Statement a: FALSE

In Java, to declare any variable as constant, static and final modifiers are used

Statement b: TRUE

In JAVA, A class can implement multiple interfaces but the class can inherit only one class

To inherit class, extends is used and to inherit an interface, implements keyword is used 

Hence the correct answer is Only (b) is TRUE.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...