Trying to implement language specific java script validation.Is there an alternative for calling language specific function with an if , else statements?
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?
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 ); } }
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.
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?
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.