Siva Sivaraman

Greenhorn
+ Follow
since Sep 26, 2002
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 Siva Sivaraman

Trying to implement language specific java script validation.Is there an alternative for calling language specific function with an if , else statements?
21 years ago
This was the answer, I was looking for

It's always possible to access a class method from within a constructor


Thanks
21 years ago
I am new to assertions.In the following code, how is it possible for the constructor C to access validateC()?
21 years ago
GC
Thanks to you all.
Didn't want to be trapped with such tricky questions.
The finalize() method is guaranteed to be called on any object eligible for GC.
True or False?
GC
The finalize() method is guaranteed to be called on any object to be GC�ed
True or False?
Select the valid modifiers for Interface methods
1.abstract
2.native
3.volatile
Is this an ambiguous question?
Thanks. Understood the concept of 'Variable Shadowing'
Please see this...Missed the instance of TubeLight in the previous one.
class Light{
protected String billType ="Small bill";
}
class TubeLight extends Light{
public String billType="Large bill";
}
public class Client{
public static void main(String args[])
{
TubeLight tubeLightRef=new TubeLight();
Light lightRef1=tubeLightRef;
System.out.println(lightRef1.billType);
}
}
Output:
Small bill
I expected "Large bill" here in this upcasting as lightRef1 denotes the Tubelight Object.Please explain.
class Light{
protected String billType ="Small bill";
}
class TubeLight extends Light{
public String billType="Large bill";
}
public class Client{
public static void main(String args[])
{
Light lightRef1=tubeLightRef;
System.out.println(lightRef1.billType);
}
}
Output:
Small bill
I expected "Large bill" here in this upcasting as lightRef1 denotes the Tubelight Object.Please explain.
I have added a new entry in the properties file.
This key, value is not recognized by tomcat, even after restarting tomcat.
public class SysProperties {
public Properties props;
public SysProperties() throws SQLException {

try{
props = new Properties();
String file_name = "/app.properties";
FileInputStream fl = new FileInputStream(file_name);
try{
props.load( fl );
}
catch(IOException ex1){
throw new SQLException( ex1.getMessage() );
}
}catch(FileNotFoundException ex) {
throw new SQLException( ex.getMessage() );

}
}
public String getProperty(String name) {
return props.getProperty( name );
}
}
21 years ago
javax.naming.NamingException: Cannot create resource instance
This is the error that I get after following the guidelines from jakarta site.
Thanks in advance for any help.
21 years ago
I was considering this solution but didn't know how to implement this in the javabean.I have implemented Internationalization in the jsp pages using the resource bundles.
If we have 2 set of resource bundle, one for Oracle and other for SQL, how to implement this in the calling java bean?
21 years ago
JSP
Hi,
Current project : JSP / Oracle database.
New requirement : JSP / SQL server
Problem : Oracle queries not compatible to SQL Server.
Question: What is the best way to solve this in the java bean?
Solution 1 : Maintain two packages 1.Oracle 2.SQL Server
Solution 2 : Maintain single pacakge with if / else statement for Oracle and SQL Server queries.
We need to maitain the code in both Oracle and SQL Server for all later versions of this project.
Any help in deciding the best approach is appreciated.
21 years ago
JSP
'byte', 'short' cannot be assigned to 'char'.
'byte' is a narrower datatype compared to 'char'.
I got it right this time.
The correct way of applying the technique is:
(((2)2+2(3))+3)-->2+2+3-->7
Note:Substitute the latest value.