Description: programming languages Online Quiz - 279 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p\t%p\t%p",p,q,r); }
f1(int c) { printf("%d", c); } void main() { int a=1; f1(a++); }
void main() { unsigned int x=-1; int y; y = ~0; if(x == y) printf("same"); else printf("not same"); }
println exhibits which type of polymorphism
What is the rule regarding overriding methods throwing exceptions?
Which is true about overloading?
Which one is not correct A. x = = Float.NaN B. Float.isNan(x); C. Myobject .equals(float.NaN);
main method can be overridden.. True/False
static methods can be overridden. True/False
Which one of these statements are valid? Char \u0061r a =’a’; Char \u0062 = ’b’; Char c =’\u0063’Which one is not correct A. x = = Float.NaN B. Float.isNan(x); C. Myobject .equals(float.NaN);
byte b; final int a = 10; final int x = a; b = x; System.out.println("The value of b is " + b);
Can we declare derived class first and then base class in java?
If you have reference variable of parent class type and you assign a child class object to that variable and invoke static method. Which method will be invoked? Parent/Child.
If there is an exception in finalize method, will the object be garbage collected?
Is the following statement correct: char ch = 'd'; if(ch < 32.00){ }
Final variables declared without initialization can be initialized in static initializer ( static final var) or in constructor( final var). True/False?
Java Polymorphism
Does File class have any method to read or write content in a file?
Is Array operations are faster than Vector.
Which of the following servlet methods can return null?