A class or a function definition in python ends with _____
semicolon
parentheses
colon
angle bracket
Identify the correct syntax for instantiating a class .
testObj = CTest
testObj = CTest()
CTest testObj = CTest()
testObj = new CTest()
The constructor in python is _____
def_init()
name of class itself.
python_init_
init
Variable in python are by default ______
public
private
global
protected
How to initialize the variable with private scope ?
Prefix the string 'private' to the variable name.
initialize it with '_init_private'
initialize it with double underscore '__'
append the keyword 'pvt' before the variable.
Can we give argument values to the parameters which are not at the end of the parameter list in the function definition ?
True
False
In java local variables are automatically instantiated(T/F)
What gets printed after this boolean b = false; if (b = true){ System.out.println("True"); }
Prints "True"
Prints nothing
Prints false
Error in if condition
What is "instanceOf" ?
an operator
a method
nothing
a keyword in Java