programming languages Online Quiz - 324
Description: programming languages Online Quiz - 324 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
Which modifier is used to prevent a method from being overridden?
You have the following class definitions: public abstract class Vehicles { } public class Bus { } public class MyClass { public Vehicles go() { return new Bus(); } } What change would have to be made to allow this code to compile?
. Which line of the following code would make the test object eligible for garbage collection? (Line numbers are included only for clarity's sake) 1. public class Garbage { 2. public static void main(String [] args) { 3. StringBuffer test = new StringBuffer("hello"); 4. System.out.println(test); 5. test = null; 6. } 7. }
21Which statement is correct concerning the assertion mechanism?
which option is a declaration of an array of Strings, called sSyntax, containing 50 elements shared between instances of a class? Incorrect. The correct option is as follows
You have the following class definition: public class Language {} You need constructors to provide developers with two methods of object instantiation. Developers should be able to instantiate the object with either a String argument or no argument. What should you do to achieve this goal? (Choose all that apply.) You have not made any correct choices. The correct options are as follows
Why will the following code not compile? Boolean b = new Boolean("false"); if (b) {}
You have the following code: public class Java { public static void main (String [] args) { double dSyntaxs; System.out.println("Its: " + dSyntaxs); } public void TrueSyntax() { System.out.println("True syntax is a work of art."); } } What would the output be? Incorrect. The correct option is as follows
Select valid scriptlink commands
What is equalent ScriptLINK command for "filestat"
What is the output for the following expression = ceil {-4.5}
What command should be used to ask the user a question which requires a yes or no response?
In the command search-string parameter -s is used for
What is the output for the following expression = ceil {-4.5}
Java is developed by
Java was intially called as
Which is not the scripting language
Which is not the keyword
How do you write an infinite loop using the for statement
What is the output of the following code when compiled and run? Select two correct answers. public class Question01 { public static void main(String[] args){ int y=0; //line 1 int x=z=1; //line 2 System.out.println(y+","+x+","+z); //line 3 } }