Introductory to object-oriented programmin UE Past Papers Questions.


View All Courses

(1297) Question Category: Short answers

To create an object from a given class involves the use of which has the smae syntax as that of any other Java method but with three exceptions. State those exceptions/ dfifferences. 

Answer / Solution

UNSOLVED

(1298) Question Category: Practical

Write a  simple Java class with one .  

Answer / Solution

UNSOLVED

(1299) Question Category: Short answers

Study the following piece of Java code  and answer the questions thereafter.

public class Brexit{

     public Brexit(String name){

       System.out.println(“The “+name+ ”want to leave EU”);

    }

    public static void main(String[] args){

   Brexit uk = new Brexit(“UK”);

}

}

  1. What is the purpose of the code in line 14 and 18 respectively?
  2. What will be the output of this code?
  3. State if exists error(s) in this code.

Answer / Solution

UNSOLVED

(1300) Question Category: Short answers

Define the following object oriented concepts

  1. Polymorphism
  2. Inheritance
  3. Encapsulation

Answer / Solution

UNSOLVED

(1301) Question Category: Short answers

What is the main use of an abstract class?

State three features that distinguishes an abstract class from a normal class.

Answer / Solution

UNSOLVED


View All Courses
News & Updates | Recently
Recent Updates
questions

2024-05-02: questions

Questions Uploaded on 2024-05-02


questions

2024-03-29: questions

Questions Uploaded on 2024-03-29


questions

2024-03-19: questions

Questions Uploaded on 2024-03-19

Dismissible in 10 seconds