Explore topic-wise MCQs in Technical MCQs.

This section includes 2 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.

1.

What does an interface contain?

A. Method definition
B. Method declaration
C. Method declaration and definition
D. Method name
E.
Answer» C. Method declaration and definition
2.

interface calculate{   void cal(int item);}class display implements calculate{	int x;	public void cal(int item)	{		x = item * item;	}}class Main{   public static void main(String args[])   {    display arr = new display();    arr.x = 0;    arr.cal(2);    System.out.print(arr.x);   }}
8.All methods must be implemented of an interface.

A. TRUE
B. FALSE
C. Can be true or false
D. can not say
Answer» B. FALSE