pras

Ranch Hand
+ Follow
since Apr 04, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by pras

is it possible???
16 years ago
public class OracleJdbcProgram {
public static void main(String args[]){

try {
Class.forName("oracle.jdbc.driver.OracleDriver");

}catch(ClassNotFoundException cnf){
System.out.println("Unable to find the driver class,so unable to load");
cnf.printStackTrace();
}
Connection con=null;
try
{
con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:2030:googleea", "system","googleearth");

}catch (SQLException se)
{
System.out.println("Failed to connect to database, check the db server status and try again");
se.printStackTrace();
}
try {
Statement st=con.createStatement();
int i=st.executeUpdate("insert into student values('mehra','Mumbai',18,'1bio02')");
System.out.println("number of rows affected..." +i);
}catch(SQLException sqe){
System.out.println("Failed to excute the query,check the query");
}
}
}


my program doesnt show any errors.. just shows a blank console.... without updating the database??
can anybody tell me that whether MYSQL version 3.0 database supports stored procedure?
Hi guys!!

just wanted to know if the stored procedure concept is supported by the MYSQL server version 3.0???
16 years ago
do we need to purchase new vouchers and pay the money again when taking the upgrade exams?
hi ,

i used tomcat 5.5 version server.


guys i got the information that it is found in logs file in tomcat directory.


thanks for the quick response
16 years ago
public class LifeCycle extends HttpServlet {

public static int instanceCount;
{
System.out.println("Doing static initialization on LifeCycle class");
instanceCount = 0;

}

public void init() {
System.out.println("In init() on LifeCycle");
}

public LifeCycle() {
instanceCount++;
System.out.println("In LifeCycle constructor");
}

public void destroy() {
System.out.println("In destroy() on LifeCycle");
}

public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
System.out.println("In doGet() on LifeCycle");
try {
throw new Exception();
} catch (Exception e) {
// Just doing this to show doGet() called from service()
e.printStackTrace();
}
}

}
16 years ago
i have written the following program which basically demonstrates Servelt life cycle.

i worked it in a notepad.


now where do i look for console messages??
[ June 15, 2008: Message edited by: Bear Bibeault ]
16 years ago
its all because of you people's help

i was a struggler in java ... not so long ago
16 years ago
am on cloud 9 guys... i cleared with 93%. i got 67 correct out of 72.

thanks to all members in java ranch community.


Regards
Prasanna.s.k
16 years ago
class neeti {

static int year[]; /*****************8DOUBT*********/

public static void main(String args[]) {
System.out.println(year);
}
}

/********** doubt*********************/

is there a object reference there --- the DOUBT line...or is it a primitive?
16 years ago
it is said that without the strictfp modifier floating points used in methods behave in platform dependent way..

how come it is true??
because java is platform independent right??
16 years ago
Hi Mark,

thisObject.compareTo(anotherObject)

you mean to say thisobject and anotherObject always will have different values?

for EXAMPLE:

Birthday girl/Thriller/Nicole kidman
Original Sin/adventure/Angelina Jolie
Evil Dead/Horror/Campbell

so suppose thisObject value is Birthday Girl so the value of anotherObject can never be Birthday Girl is it? it has to be either Original Sin or Evil Dead right?

Then when does comparator come into picture? is it that it compares Instance by Instance?
Suppose for first value of DVDInfo d the value is

Birthday girl/Thriller/Nicole kidman

so d.getTitle() will return Birthday girl and
return title.comapreTo(d.getTitle());
title will also contain Birthday girl then its the same right??

i didnt understand the concept of
thisObject.compareTo(anotherObject)

here what is thisObject and what is anotherObject?
i mean are both BIRTHDAY GIRL??
public int compareTO(DVDInfo d) {

return title.comapreTo(d.getTitle());
}



suppose for example we have

Birthday girl/Thriller/Nicole kidman
Original Sin/adventure/Angelina Jolie
Evil Dead/Horror/Campbell


what is the difference between title and d.getTitle , i guess both will have same objects. i want to understand how are the objects taken???\

can anyone help?