nanda kishore


{ City } mumbai
< Country > india
* Profession *
User No # 54437
Total Questions Posted # 2
Total Answers Posted # 7

Total Answers Posted for My Questions # 6
Total Views for My Questions # 9676

Users Marked my Answers as Correct # 31
Users Marked my Answers as Wrong # 11
Questions / { nanda kishore }
Questions Answers Category Views Company eMail

How to call the m1() method of Base class in below snippet ? class Base { public void m1() { System.out.println("Base m1 "); } public void m2() { System.out.println("Base m1 "); } } ====================== class Derived extends Base { public void m1() { System.out.println("Derived m1"); } public void m3() { System.out.println("Derived m3"); } public static void main(String[] args) { Base ob=new Derived(); ob.m1(); //System.out.println("Hello World!"+ob.m1()); } }

Cap Gemini, TCS,

6 Java J2EE AllOther 7116

Explain the OOPS concept in Realtime Scenarion ? Take example as CAR. Please explain indetail ?

Cap Gemini,

Java J2EE AllOther 2560




Answers / { nanda kishore }

Question { TCS, 7056 }

What is the difference between interpreter and compiling ?


Answer

Compiler: Converts Java code into Byte Code.
Interpreter: Converts Byte Code into Machine(Operating System) dependend Code .

Is This Answer Correct ?    0 Yes 0 No

Question { 3665 }

what are the application of compiler and interpreter for
source program


Answer

java source code --> Byte Code --> JVM --> Machine code

Here JavaCompiler is act as a compiler and the JVM is act as
the interpreter b/n Bytecode and Machine code. Due to JVM
the java is a platform independent...

Is This Answer Correct ?    1 Yes 0 No


Question { 3189 }

what is platform dependent translation and platform dependent
programming language


Answer

The compiler is specific to compile the source code for
specific platform is called Platform Dependent programming
language...


Java is platform independent its have the capability to
compile the source code in specific platform by its platform
specific JVM..

Is This Answer Correct ?    1 Yes 2 No

Question { 3966 }

why we need this (1.object,2.class,3.data
hiding,4.encapsulation,5.abstraction,6.
polymorphism,7.inheritance)


Answer

Don't Go to learn anything without knowing this.... If u
know this Java is a piece of cake.....

Is This Answer Correct ?    0 Yes 6 No

Question { 7495 }

Are Servlets by default thread safe or not?

thanks in advance
regards
Sudhakar


Answer

No.

By default Servlets are not thread safe...Bcoz Servlet is
concept of Single instance multiple threads concept.
Multiple thread are acting on single object means its not
thread safe....

Is This Answer Correct ?    7 Yes 3 No

Question { 6452 }

What is immutable class? how to make a Class explicitly
"Immutable"?Wap to make a class explicitly immutable.


Answer

I think u know... String is not a data type.. it is a
class...right..

By default the String class is a immutable class. That means
once we instantiate the object or assigning the value to
String is immutable. Once we can assign / instantiate the
String class we can't change in the future....


class StringDemo
{
public static void main(String[] args)
{
String s1="Nanda";
String s2="Kishore";
String s3=new String("Nanda Kishore");
System.out.println(s1);
System.out.println(s2);
System.out.println(s3);
}
}



U try any changes anything and print s1,s2 & s3.... If
changes then it is not immutable. If not it is immutable.



Is This Answer Correct ?    2 Yes 0 No

Question { IBM, 7542 }

what happens if we wont use destroy()?


Answer

Think, if there is 100's of objects are utilizing the
resource(i.e Connection object). That means allocation of
those objects are stored in the internal memory of the JVM
right... If similar requests are utilizing the Connection
object.... at one time the JVM utilization memory is full...
this will degrade the application. For this reason we call
explicitly destroy()...... if not the Garbage Collector will
taken care to reclaim the memory.... by we don's say when it
will be reclaim the memory and free the JVM memory......

Is This Answer Correct ?    20 Yes 0 No