Skip to content
Home
About us
Quizzes
Practice Tests
o Quantitative Aptitude
o English Language Test
o General Knowledge Test
o Geography
o History
o Union Public Service Commission
IS5103 WEEK4 LESSON 7 QUIZ
admin
August 13, 2024
IS5103
, 1. Which of the following statements can be inserted in the blank line so
that the code will compile successfully?
interface CanHop {}
public class Frog implements CanHop {
public static void main(String[] args) {
_ frog = new TurtleFrog();
}
}
class BrazilianHornedFrog extends Frog {}
class TurtleFrog extends Frog {}
Each correct answer represents a complete solution. Choose all that apply.
1. Frog
2. TurtleFrog
3. CanHop
4. var
2. Which statements about the following program are correct?
1. interface HasExoskeleton {
2. double size = 2.0f;
3. abstract int getNumberOfSections();
4. }
5. abstract class Insect implements HasExoskeleton {
6. abstract int getNumberOfLegs();
7. }
8. public class Beetle extends Insect {
9. int getNumberOfLegs() { return 6; }
10. int getNumberOfSections(int count) { return 1; }
11. }
The code will not compile because of line 8.
3. Which statements about the following program are correct?
Home
About us
Quizzes
Practice Tests
o Quantitative Aptitude
o English Language Test
o General Knowledge Test
o Geography
o History
o Union Public Service Commission
IS5103 WEEK4 LESSON 7 QUIZ
admin
August 13, 2024
IS5103
, 1. Which of the following statements can be inserted in the blank line so
that the code will compile successfully?
interface CanHop {}
public class Frog implements CanHop {
public static void main(String[] args) {
_ frog = new TurtleFrog();
}
}
class BrazilianHornedFrog extends Frog {}
class TurtleFrog extends Frog {}
Each correct answer represents a complete solution. Choose all that apply.
1. Frog
2. TurtleFrog
3. CanHop
4. var
2. Which statements about the following program are correct?
1. interface HasExoskeleton {
2. double size = 2.0f;
3. abstract int getNumberOfSections();
4. }
5. abstract class Insect implements HasExoskeleton {
6. abstract int getNumberOfLegs();
7. }
8. public class Beetle extends Insect {
9. int getNumberOfLegs() { return 6; }
10. int getNumberOfSections(int count) { return 1; }
11. }
The code will not compile because of line 8.
3. Which statements about the following program are correct?