Which of the following is a correct interface?
a. interface A { void print() { }; }
b. abstract interface A { print(); }
c. abstract interface A { abstract void print() { };}
d. interface A { void print();}
d In A, the print() method in the interface is a concrete method. In B and C, the abstract keyword is used before the interface, which is wrong. The correct answer is D.
You might also like to view...
The ____ flag in the placeholder of a format-string passed to printf() causes a variable to be left-justified within its field.
A. - B. + C. 0 D. l
The X.25 standard uses which protocol at the Frame Level?
a. V.24 b. LAP-B c. X.3 d. none of the above
Toyota recalled 133,000 Prius hybrid automobiles in the United States in March 2010 because of a ____ problem with the braking system.
A. software B. hardware C. firmware D. malware
If you wish to prevent a page break from occurring within a paragraph use the ________ pagination command
A) Page break before B) widow/orphan control C) Keep with next D) Keep lines together