Ask your own question, for FREE!
Computer Science 9 Online
OpenStudy (anonymous):

___________ is a special constant that is not an object but can be used to give a value to any variable of class type. a. void b. this c. null d. false

OpenStudy (anonymous):

That's C

OpenStudy (espex):

I would agree with @mnecochear , NULL is a special constant used to give a value of "nothing" to basically any variable.

OpenStudy (anonymous):

Explain the "public" keyword in public static void main(String args[]) method in Java Answer a. You need not have an instance of the class to access the method b.The method can be accessed outside the class / package c.Your application need not return a value, as the JVM launcher would return the value when it exits d.This is the entry point for the application

OpenStudy (espex):

Think about what the name implies.

OpenStudy (anonymous):

It's b. These are called access modifiers and determine where the method can be used. Other examples are private, protected, etc

OpenStudy (espex):

:D

OpenStudy (anonymous):

Select the four correct answers. Answer 1. A Java program must have a package statement. 2. A package statement if present must be the first statement of the program (barring any comments). 3. If a Java program defines both a package and import statement, then the import statement must come before the package statement. 4. An empty file is a valid source file. 5. A Java file without any class or interface definitions can also be compiled. 6. If an import statement is present, it must appear before any class or interface definitions. i choose 1,2,3 and 6 but not sure

OpenStudy (espex):

I would think about #1 a little more. What is the "package" statement used for?

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!