+ Follow
since Feb 20, 2000
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mahen

Any body having any clue to get the netbeans type property editor.
Or atleast table structure which can be edited in a similar way!!
22 years ago
Hi javagurus
how do i get rid of dos window in the background while running a a java gui based programs
23 years ago
This message is addressed to post below
Give me your mail address
Iwould mail the RFC to you.....
I guesss thats waht is needed..
Of course you should know java network programming..

[This message has been edited by Mahen (edited May 23, 2000).]
i wrote a servlet stored it in C:\jsdk2.1\examples\WEB-INF\servlets\ and compiled it to class file
whenever i try to access it i.e. execute it thru browser
403 forbidden error is thrown
and why two different servletrunner in jsdk2.0 and startserver in jsdk2.1
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class X extends HttpServlet {
ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
PrintWriter out = response.getWriter();
out.println("<body bgcolor=\"white\">");
String title = rb.getString("helloworld.title");
out.println("<title>" + title + "</title>");
out.println("<a href=\"../servlets/helloworld.html\">");
out.println("<img src=\"../images/code.gif\" height=24 " +
"width=24 align=right border=0 alt=\"view code\"></a>");
out.println("<a href=\"../servlets/index.html\">");
out.println("<img src=\"../images/return.gif\" height=24 " +
"width=24 align=right border=0 alt=\"return\"></a>");
out.println("<h1>" + title + "</h1>");
24 years ago
How do i start.....
which are essentials for making servlets work...
just completed scjp....
24 years ago
Cleared exam with 83% first attempt.
Exam is not that difficult person but person having clear fundamentals about JAVA can pass
very easily
I used RHE and Mughal Rasmussen(thanks to Rammurthy for this book)
There are many questions in exam that resemble Mock exam
I was lucky I got very easy questions on collections(1ques) and IO (2 ques)and GridbagLayout (1 ques)
I did all Mock exams
All tutorials
I went thru all discussion threads on javaranch and marcus site
Thanks to TONY JIM Maha anna and everybody at JAVARANCH
I was never alone studying for exam
Thanks for your support
hiiiiiii alkesh
At the start i=1 and i also has an accessibility outside the do loop to0
when i++ is done i=2
at this pont b=true
so loop iterates
again i++ executes i=3
at this point b=false because b=!true
loop condition is tested at this point condition is false
loop comes out and value of i is 3 at this time so 3 is printed

what is meant by ordering in the collection interfaces is it the order in which objects are added to the collection..
what is the actual use of compareTo() method
It would be good to see an code example..
list is ordered so it maintains the actual order in which elements were ordered
set doesnt maintain the order(why not....)
what is the difference between
Allotted display area of component
Filling and anchoring area
Bounds of component
Components preffered size
and how do these areas for components determined
and how these get affected by other components
24 years ago
hey I got another way to answer
Menubar can only be added to Frames question
True its only Frames because setMenuBar(menubar) method is only defined in frames classs........
Hi diwakar...

public class ExcepDemo {
public static void main(String argv[]){
Child e = new Child();
}catch(IOException ioe) {}
public void amethod()throws FileNotFoundException{}
class Child extends ExcepDemo{
public void amethod() <correction throws FileNotFoundException >{}
Here you are calling child class method which is not declared throwing any compatible exception so that try catch block in the main method is justified so it generates the compiler error.......
whenever you are calling a method which seems to throw exception you got to declare it in throws clause of that method.........or use try catch block in the method with appropriate exception.......
and mind you this is true only for checked exception
Hope it helps!
Diwakar are you from Mumbai...........
Hey anju
see menubars can only be added to Frames
because setMenuBar(menubar)method is only present in frames class
and as the PopupMenu can be added thru class Component as add(PopupMenu) you can add popup menu to all the components in the above question because all are inherited from the component
here what is happening in class Component there is composition(aggregation) wrt PopupMenu class.........(not exact composition but we can say composition) look in the java source code which comes along with jdk1.2...
add() method is overloaded to include the popupmenu capability to components.....inherited from Components.......
hope i am correct.......
Hiiiiiii folks
Why window class is required...........
and regarding adding menubars to java.awt.components
According to me we can add menubars only to frames because we have Frame.setMenuBar(new Menubar()) method only in Frame to make menubar visible on frames........
what does this ('\141' )representation mean
aval = '\141';
System.out.println(" val of a : " + aval);
we get " val of a : " a
'\141' is a...
Hi folks correction in marcus tutorial........
The protected modifier is a slight oddity. A protected variable is visible within a class, and in sub classes, the same package but not elsewhere.<And also in classes in other packages which subclass this class thru handle of the class in other package ........>The qualification that it is visible from the same package can give more visibility than you might suspect. Any class in the same directory is considered to be in the default package, and thus protected classes will be visible. This means that a protected variable is more visible than a variable defined with no access modifier
RHE question pg no 124
Dog rover,fido;
Animal anim;
rover = new Dog();
anim = rover;//here rover which is reference to
a dog object is assigned to anim so anim now points to a Dog object
fido=(Dog) anim;//here anim is a dog reference and fido too is a dog reference so why this cast is needed.....
RHE say that it is needed I too know conversion is down the hierarchy but the point is anim is pointing to Dog object so explicit cast is not required.............any explanations........
I would like to know what happens in memory.........