Which four are syntactically correct?

Which four are syntactically correct?

Which four are syntactically correct?

A.
package abc; package def; import Java.util . * ; public class Test { }

B.
package abc; import Java.util.*; import Java.util.regex.* ; public class Test { }

C.
package abc; public class Test {} import Java.util.* ;

D.
package abc; import java.util. *; public class Test{}

E.
public class Test{} package abc; import java.util.*{}

F.
import java.util.*; public class Test{}

G.
package abc; public class test {}



Leave a Reply 5

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


bob

bob

The “Java” package should be read “java” in all the answers

R. Zafra

R. Zafra

Not necesarelly, the question says “syntactically correct”, and the package “Java” is syntactically correct.

Grettings!

Sanjukta

Sanjukta

B,D,F,G

ARJIT GAUTAM

ARJIT GAUTAM

@sanjukta : have you clear the exam ?