5
Latest Answer: It gives 1 as output. ...
Latest Answer: Interface is design on which class is built.Interface is a java defined type. ...
Latest Answer: Static Methods over loading is of no use for example the below code will produce a output of B.m1 C.m1 C.m1 if we remove static in those functions we will get an ouput of B.m1 C.m1 B.m1 class C{ static ...
Latest Answer: yes answer is final it wou't give chance to other to modify. it prevant to other to chace the class. ...
Latest Answer: protected void finalize() method is called by the garbage collector just before it is about to reclaim the memory space acquired by the object. ...
What is the better way of writing the Constructor with 2 parameters in the following code:class Test { int x,y; Test(int a) { //Code for very complex operations will be written //in this place x=a; } Test(int a, int b) { //Code for very complex operations will be written //in this place (same code as in above constructor) x=a; y=b; } }
By default, Strings to functions are passed using the method(a) Call by Value (b) Call by Reference (c) Strings cannot be passed to function
(b)String is a class defined in java.lang and in java all classes are passed by reference.
Latest Answer: Please clarify the difference class A{void calc(){}int calc(int){}}class B:public A{void calc(){}}This is just an abstract of the program.If we have a program like this and an object of class B is created and we call b.calc will the compiler ...
Which of the following 2 methods executes faster ?class Trial { String _member; void method1() { for(int i=0;i<2048;i++) { _member += "test"; } } void method2() { String temp; for(int i=0;i<2048;i++) { temp += "test"; } _member = temp; } } (a) method1() (b) method2() (c) Both method1() and method2() takes same time for execution
(b)Accessing method variables requires less overhead than accessing class variables.
If we want to read a very big text file with so many mega bytes of data, what shall we use ?(a) FileInputStream (b) InputStreamReader (c) BufferedReader
Answered by Hari on 2005-05-09 07:42:40: BufferedReader
View page [1] 2 Next >>

Go Top