Krishna Shubha

Greenhorn
+ Follow
since Dec 08, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Krishna Shubha

Hi,

May be my doubt looks foolish,but I want to know how can we configure a personal webserver so that it works like a javawebserver,I want to practice servlets and some other stuff,so can anybody help me out?Thanking you in advance..
krishna
20 years ago
Hi steeve,
Thank you very much...
Krishna
21 years ago
Hi,

I have a question..
what is the difference between virtual function and non virtual function?
how do you specify a pure virtual function?
thanks in advance
Krishna
21 years ago
Hai,
I just started to work eith servlets and when I have given the import javax.servlet.* it's giving that javax.servlet not found in jdk....I have downloaded the jdk..where could be the problem..please don't think that without trying I had put up the question here..please help me...
Krishna
21 years ago
Hai,
I have cleared scjp and I am planning to take scjd now,frankly speaking I don't have proper idea where to start and how to prepare for that..can anybody help me.what books I can follow or there any websites for collecting material and all..Thanks in advance...
Regards
Krishna
Hai,
I cleared scjp on 26th ofcourse not with much percentage..I am so thankful to all the moderators of javaranch..I am planning to take developers test next..but I don't have any idea of the objectives and books regarding developers test ..can you please guide me...Thank you once again...
Krishna
Thank you very much karsthish and Jim for your kind reply...I am sorry jim I got the mistake I have done while compiling using second option,actually I mistakenly defined default constructor in the super class i.e A,so I didn't get any compiler error...I am really so thankful to you for responding to this..I am going to take the exam tomorrow...
Regards
Krishna
Hi,
I saw this question in one of the mock tests...I don't know whether it is already discussed here I am a recent visitor of this site ..when I tried to complie and run the code using options b & c ..it's not giving me the error...so why b & c are not given as answers here...please can anybody give me the explanation ,I am wrong or the answer given is wrong?
please respond to this....
Given the following class definition:
class A {
protected int i;
A(int i) {
this.i = i;
}
}
Which of the following would be a valid inner class for this class?
Select all valid answers.
a) class B {
}
b) class B extends A {
}
c) class B {
B() {
System.out.println("i = " + i);
}
}
d) class B {
class A {
}
}
e) class A {
}
Given answer is only A.
Regards
Krishna

Hi,
Thank you for your good explanation...
Hi,
may be I am wrong for asking you this question at this time but I got confused .....in the code above why it's not giving any ClassCastException at q=(Q2)t....when I was experimenting such type of examples by taking one parent class and a subclass I am getting the error when I tried to do that..here I am giving my simple example I tried...
class parent {}
class sub extends parent{}
public static void main(String args[])
{
parent p=new parent();
sub s= new sub();
p=s //compiles and runs fine
s=(sub)p //giving classcastexception at run time..
}
I think the same thing done in the above code..please let me know.
Krishna
Hi,
Thank you for your detailed explanation.
Hi,
when I compiled and run the following code I am getting output as "overriding in static2" followed by "in static1" but static methods can be overridden by a static method so in this code s1 is holding the object of static2 so it should call the method of static2 only but why it is calling the method of class static1 please can anybody help me...

class static1
{
protected static void method1()
{
System.out.println("in class static1");
}
}
public class static2 extends static1
{
protected static void method1()
{
System.out.println("overriding");
System.out.println("in static2");
}
public static void main(String args[])
{
static2 s=new static2();
static1 s1=new static2(); //holding the object of static2
s.method1();
s1.method1(); //here it is calling the method of static1 ....
}
}
please help me..
Regards
Krishna
HI emmanuel,
Where u want to Load If u could write in detail I can try
21 years ago
Please not NOT IS MISSING IN THE ABOVE REPLY.SORRY FOR THAT
21 years ago
HI, Vrinda
ca I see ur programm code ?.I did had any problem executing JApplet And I did add any pug ins
21 years ago