Searching for "="

Q:

public abstract class Shape {

private int x;

private int y;

public abstract void draw();

public void setAnchor(int x, int y) {

this.x = x;

this.y = y;

}

}

Which two classes use the Shape class correctly?

A) public class Circle implements Shape { private int radius; B) public abstract class Circle extends Shape { private int radius; }
C) public class Circle extends Shape { private int radius; public void draw(); D) None
 
Answer & Explanation Answer: B) public abstract class Circle extends Shape { private int radius; }

Explanation:

Only B is true

Report Error

View Answer Report Error Discuss

Filed Under: Java

Q:

void waitForSignal() {

Object obj = new Object();

synchronized (Thread.currentThread()) {

obj.wait();

obj.notify();

}

}

Which statement is true?

A) This code can throw an InterruptedException. B) This code can throw an IllegalMonitorStateException.
C) This code can throw a TimeoutException after ten minutes D) All the above
 
Answer & Explanation Answer: B) This code can throw an IllegalMonitorStateException.

Explanation:

It will throw  IllegalMonitorStateException.

Report Error

View Answer Report Error Discuss

Filed Under: Java
Job Role: IT Trainer

Q:

public class Threads2 implements Runnable {

public void run() {

System.out.println("run.");

throw new RuntimeException("Problem");

Which among the following is true?

}

public static void main(String[] args) {

Thread t = new Thread(new Threads2());

t.start();

System.out.println("End of method.");

}

}

A) java.lang.RuntimeException: Problem B) run. java.lang.RuntimeException: Problem
C) End of method. java.lang.RuntimeException: Problem D) End of method. run. java.lang.RuntimeException: Problem
 
Answer & Explanation Answer: D) End of method. run. java.lang.RuntimeException: Problem

Explanation:

Only D can be true

Report Error

View Answer Report Error Discuss

Filed Under: Java

Q:

 (3x + 2) (2x - 5) = ax² + kx + n .

What is the value of a - n + k ?

A) 5 B) 8
C) 9 D) 10
 
Answer & Explanation Answer: A) 5

Explanation:

This is a quadratic equation. To find n we multiply the last terms in each bracket together (2 times -5) = -10

To find ‘a’ we multiply the first terms in each bracket together (3x times 2x) = 6x2, So a = 6.

Thus a - n = 16

To find k we multiply the first term in the first bracket by the second term in the second bracket and add the result to the product of the second term in the first bracket and the first term in the second. (-15x + 4x) = -11x. So k = -11

16 - 11 = 5

Report Error

View Answer Report Error Discuss

Filed Under: Problems on Numbers
Exam Prep: GRE

Q:

If the volume of the cube is 729 cm3, then the surface area of the cube will be

A) 486 sq.cm B) 456 sq.cm
C) 446 sq.cm D) 476 sq.cm
 
Answer & Explanation Answer: A) 486 sq.cm

Explanation:

volume = a3 = 729;

=> a = 9

 

surface area= 6a2 =  (6 x 9 x 9) = 486 sq.cm

Report Error

View Answer Report Error Discuss

Filed Under: Volume and Surface Area
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Bank Clerk , Bank PO

Q:

On 19th June, 1984 Monday falls. What day of the week was it on 19th June, 1985?

A) Sunday B) Monday
C) Tuesday D) Wednesday
 
Answer & Explanation Answer: C) Tuesday

Explanation:

The year 1985 is an ordinary year. So, it has 1 odd day.

So, the day on 19th June, 1985 will be 1 day after the day on 19th June, 1984.

But, 19th June,1984 is Monday

S0, 19th June, 1985 is Tuesday.

Report Error

View Answer Report Error Discuss

Filed Under: Calendar

Q:

If log 2 = 0.3010 and log 3 = 0.4771, the values of log5 512 is

A) 2.875 B) 3.875
C) 4.875 D) 5.875
 
Answer & Explanation Answer: B) 3.875

Explanation:

ANS:      log5512 = log512/log5  =  log29log10/2  =9log2log10-log2 =9*0.30101-0.3010 =2.709/0.699 =2709/699 =3.876

Report Error

View Answer Report Error Discuss

Filed Under: Logarithms
Exam Prep: Bank Exams
Job Role: Bank PO

Q:

3x + y = 19  and x + 3y = 1. Find the value of 2x + 2y

A) 20 B) 18
C) 11 D) 10
 
Answer & Explanation Answer: D) 10

Explanation:

To solve a pair of simultaneous equations such as those given we can add or subtract them.

Adding we get 4x + 4y = 20

Therefore 2x + 2y = 10

Report Error

View Answer Report Error Discuss

Filed Under: Numbers
Exam Prep: GRE