Introductory to object-oriented programmin UE Past Papers Questions.


View All Courses

(1292) Question Category: Short answers

State what will be the output of the following piece of Java Code?

class Precedence{

public static void main(String[] args){

     int i=4,j=8,k=4;

     int l=i+j/k;

     System.out.println(“The value of l is :”+l);

      int m=(i+j)/k;

     System.out.println(“The value of m is :”+m);

}

}

Answer / Solution

UNSOLVED

(1293) Question Category: Short answers

State and describe the four commonly used access modifiers of a method

Answer / Solution

UNSOLVED

(1294) Question Category: Short answers

In Java progreamming context, what does each of the following reserved keyword do ?

  1. this
  2. new
  3. extends
  4. abstract
  5. import

Answer / Solution

UNSOLVED

(1295) Question Category: Practical

What is a method? In a class called UE, write a simple Java class with a method called showGrade which accepts two arguments rowMark and grade. The method showGrade compares the accepted row mark on the condition that, if row mark is bigger than 50 it assigns A otherwise it assigns F. Invoke this method into the main method and pass values for rowMark as well as the grade.

Answer / Solution

UNSOLVED

(1296) Question Category: Short answers

What is method overloading? give a simple pseudo code to demonstrate the overloading process.

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