Devry CIS 355A Week 4 Quiz latest

$14

Quantity:

Description

Devry CIS 355A Week 4 Quiz latest

  1. 1.Question : (TCOs 1–8) Analyze the following code.

public class Test {

public static void main(String[ ] args) {

Number x = new Integer(3);

System.out.println(x.intValue());

System.out.println((Integer)x.compareTo(new Integer(4)));

}

}

The program has a compile error because the member access operator (.) is executed before the casting operator.

The program has a compile error because intValue is an abstract method in Number.

The program compiles and runs fine.

The program has a compile error because x cannot be cast into Integer.

The program has a compile error because an Integer instance cannot be assigned to a Number variable.

Question 2. Question : (TCOs 1–8) Which of the following statements are not correct?

Object i = 4.5;

Integer i = 4.5;

Number i = 4.5;

Double i = 4.5;

Question 3. Question : (TCOs 1–8) Suppose A is an interface and B is a concrete class with a default constructor that implements A.Which of the following is correct?

B b = new B();

A a = new A();

B b = new A();

none of them

Question 4. Question : (TCOs 1–8) Assume Calendar calendar = new GregorianCalendar(). _____ returns the month of the year.

calendar.get(Calendar.MONTH)

calendar.get(Calendar.WEEK_OF_MONTH)

calendar.get(Calendar.MONTH_OF_YEAR)

calendar.get(Calendar.WEEK_OF_YEAR)

Question 5. Question : (TCOs 1–8) Assume Calendar calendar = new GregorianCalendar(). ________ returns the number of days in a month.

calendar.get(Calendar.WEEK_OF_YEAR)

calendar.get(Calendar.WEEK_OF_MONTH)

calendar.get(Calendar.MONTH_OF_YEAR)

calendar.getActualMaximum(Calendar.DAY_OF_MONTH)

calendar.get(Calendar.MONTH)

Question 6. Question : (TCOs 1–8) Pressing a button generates a(n) _____ event.

ContainerEvent

MouseMotionEvent

ItemEvent

ActionEvent

MouseEvent

Question 7. Question : (TCOs 1–8) Every event object has the _____ method.

getSource()

getKeyChar()

getTimeStamp()

getActionCommand()

getWhen()

Question 8. Question : (TCOs 1–8) The interface _____ should be implemented to listen for a button action event.

FocusListener

ContainerListener

ActionListener

MouseListener

WindowListener

Question 9. Question : (TCOs 1–8) To listen to mouse moved events, the listener must implement the _____ interface or extend the _____ class.

ComponentListener/ComponentAdapter.

MouseListener/MouseAdapter.

MouseMotionListener/MouseMotionAdapter.

WindowListener/WindowAdapter.

Question 10. Question : (TCOs 1–8) Which of the following statements registers a panel object p

as a listener for a button variable jbt?

jbt.addActionEventListener(p);

jbt.addActionListener(p);

jbt.addEventListener(p);

addActionListener(p);

 

DeVry Courses helps in providing the best essay writing service. If you need 100% original papers for Devry CIS 355A Week 4 Quiz latest, then contact us through call or live chat.

Devry CIS 355A Week 4 Quiz latest

Best Devry CIS 355A Week 4 Quiz latest

Devry CIS 355A Week 4 Quiz latest