___________ 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
That's C
I would agree with @mnecochear , NULL is a special constant used to give a value of "nothing" to basically any variable.
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
Think about what the name implies.
It's b. These are called access modifiers and determine where the method can be used. Other examples are private, protected, etc
:D
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
I would think about #1 a little more. What is the "package" statement used for?
Join our real-time social learning platform and learn together with your friends!