This JAVA FUNDAMENTALS quiz assesses key concepts in Java programming, including file naming, class construction, string manipulation, and object instantiation. It is designed for learners to validate their understanding and skills in Java development.
In java, an instance field declared public generates a compilation error
Int is the name of a class available in the package java.lang
Instance variable names may only contain letters and digits.
A class has always a constructor (possibly automatically supplied by the java compiler)
Rate this question:
6
Columbia
8
River
Rate this question:
Instance variables
Instance methods
Constructors
All of the above
Rate this question:
An application can in general be trusted whereas an applet can't
An applet must be executed in a browser environment.
An applet is not able to access the files of the computer it runs on
(A), (B) and (C).
Rate this question:
MyClass mc = new MyClass();
MyClass mc = MyClass();
MyClass mc = MyClass;
It can't be done. The constructor of MyClass should be defined as public void MyClass(){/*code*/}
Rate this question:
The type of code generated by a Java compiler
The type of code generated by a Java Virtual Machine
It is the code written within the instance methods of a class.
It is another name for comments written within a program.
Rate this question:
The operating system periodically deletes all of the java files available on the system
Any package imported in a program and not used is automatically deleted
When all references to an object are gone, the memory used by the object is automatically reclaimed.
. The JVM checks the output of any Java program and deletes anything that doesn't make sense.
Rate this question:
Depth must be an int
Dive must be a method
Dive must be the name of an instance field.
Submarine must be the name of a class
Rate this question:
Int [] myList = {"1", "2", "3"};
Int [] myList = (5, 8, 2);
Int myList [] [] = {4,9,7,0};
Int myList [] = {4, 3, 7};
Rate this question:
Method
Native
Subclass
Reference
Rate this question:
Interface
String
Float
Unsigned
Rate this question:
Final int k = 4;
Public int k = 4;
Static int k = 4;
Abstract int k = 4;
Volatile int k = 4;
Rate this question:
Boolean b1 = 0;
Boolean b2 = 'false';
Boolean b3 = false;
Boolean b4 = Boolean.false();
Rate this question:
Finally
Compilation fails.
The code runs with no output.
An exception is thrown at runtime.
Rate this question:
Finished
Exception
Compilation fails.
Arithmetic Exception
Rate this question:
Nothing. The program will not compile because no exceptions are specified.
Nothing. The program will not compile because no catch clauses are specified.
Hello world.
Hello world Finally executing
Rate this question:
True
False
Compilation fails
An exception is thrown at runtime
Rate this question:
Java.lang.String
Java.lang.Double
Java.lang.StringBuffer
Java.lang.Character
Java.util.Map
Java.util.List
Java.util.Collection
None of the above
Rate this question:
Init();
Start();
Run();
Resume();
Rate this question:
Thread(Runnable r, String name)
Thread()
Thread(int priority)
Thread(Runnable r, ThreadGroup g)
Rate this question:
Calling the SetPriority() method on a Thread object.
Calling the wait() method on an object.
Calling notify() method on an object.
Calling read() method on an InputStream object.
Rate this question:
Wait()
Notify()
Notifyall()
Exits synchronized code
Rate this question:
Start()
Notify()
Run()
Terminate()
Rate this question:
Quiz Review Timeline (Updated): Mar 19, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.