sachinb mahajan

Greenhorn
+ Follow
since Jun 30, 2006
Merit badge: grant badges
For More
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 sachinb mahajan

Got the solution


Inside the logic iterate tag I can access individual value object with the help of id that I used in the logic iterate tag. I can check the desired value and programatically write an option with 'selected'
17 years ago
I am using logic iterate to generate select box on the screen.
The box gets populated with the options properly but I am unable to select a specific entry.
Here is the code



How can I select a specific entry in the list of options?
17 years ago
I am using logic iterate to generate select box on the screen.
The box gets populated with the options properly but I am unable to select a specific entry.
Here is the code

How can I select a specific entry in the list of options?
[ July 18, 2006: Message edited by: sachinb mahajan ]
17 years ago
At compilation time the reference type decides the exception needs to be catched

e.g.

Ping u = new Ping();

since Ping is a child class and the refrence of the child class is used to invoke method

u.getInt(args[0])

in the child class method getInt doesn't throw any exception so you dont need to catch it.

if you would have had reference of the Util class

e.g.

Util u = new Util();

then while calling method getInt you need to have try catch block as it throws the excpetion.
17 years ago
It wont give any output. Code wont get compiled. The Base class A has a constructor which takes int as an argument. Any class extending it has to have a constructor which will explicitly call base class constructor



else compiler will put default no arg super call in the derived class constructor which will cause the compilation to fail.
First the no arg constructor is called. Which calls the constructor with the integer as a formal paramter passing 7 as a parameter. Then there is a this() call which calls the constuctor with double as formal parameter which prints 3.0 then the Test method is called from the constructor taking int. Since it recieved 7 as a parameter same gets printed.

I hope you asked for the reason why 3.0 and 7 is the output.