What three modifications, made independently, made to class greet, enable the code to compile and run?

Given: What three modifications, made independently, made to class greet, enable the code
to compile and run?

Given: What three modifications, made independently, made to class greet, enable the code
to compile and run?

A.
import handy.dandy,KeyStroke; added after line 1

B.
import handy.dandy.*; added after line 1

C.
import handy.*; added before line 1

D.
line 6 replaced with handy.dandy.KeyStroke Stroke = new handy.dandy.KeyStroke();

E.
line 6 replaced with handy.dandy.keystroke stroke = new KeyStroke ( );

F.
import handy.dandy.KeyStroke.typeException(); added before line 1

G.
line 6 replaced with handy.*.KeyStroke = new KeyStroke ( );



Leave a Reply 2

Your email address will not be published. Required fields are marked *


imyrta

imyrta

Answers: A, B, D

Explanation:

Since the question is requesting three correct answers I will assume that
A is: import handy.dandy.KeyStroke; added after line 1

C is wrong because the compiler will not scan for packages.
E is wrong because the name is different form the real one.
F is wrong because java dose not support non static method imports.
G is wrong because this type of referencing is not supported in java.