Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

midhun raj

+ Follow
since Jun 04, 2011
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 midhun raj

I am using mysql as database and netbeans as IDE ..
I tried this small code to get database connectivity
package database;

* @author midhun

import java.sql.*;

public class JDBCSAMPLE {

public static void main( String args[]) {

String connectionURL = "jdbc:mysql://localhost:3306/cmgmt";
// Change the connection string according to your db, ip, username and password

try {

// Load the Driver class.
// If you are using any other database then load the right driver here.

//Create the connection using the static getConnection method
Connection con = DriverManager.getConnection (connectionURL);

//Create a Statement class to execute the SQL statement
Statement stmt = con.createStatement();

//Execute the SQL statement and get the results in a Resultset
ResultSet rs = stmt.executeQuery("select * from regist;");

// Iterate through the ResultSet, displaying two values
// for each row using the getString method

while (
System.out.println("Name= " + rs.getString("f_n") + " sex= " + rs.getString("sex")+"place="+rs.getString("place"));
catch (SQLException e) {
catch (Exception e) {



But i am getting the error when i run the fie error is

java.lang.ClassNotFoundException: com.mysql.jdbc.Drive
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at database.JDBCSAMPLE.main(
BUILD SUCCESSFUL (total time: 2 seconds)

Any guess how to solve this problem..
Thanks dude that explains it ..thanks
9 years ago
suppose i have

How to create an object of class B inside class D and call its methodB from class D...

Any help is appreciated
9 years ago
In java method overloading means functions with same function signature but different return type and differ in the amount of there argument...
I need questions like this for example...

Write a program on function overloading with aera() of cube,cuboid,sphere etc...

please share some more example questions of this sort
9 years ago
Could some one please give me about 15-20 practical questions on method overloading.I have to make my cousine the concept clear by making him do more sample practise problem.Any help would be highly appreciated
9 years ago
To design that .. what i need is just a demo program .. i need to work it only for my local host
Implement an SMTP server and client .Store the email in users inbox/outbox...

This was one of our university exam question..I am not much familiar with these types of programming please do help me .Thanks in advance,

When using return i am getting output like this...
But if its return works with catch then how come the rest of the main program gets executed to give this output..
Will not the program terminate at the return point..

Thanks for your help and support...
I am very much new to java program ..
10 years ago
To print the bytes in a file

i get the error...

if i modify this program...

it works fine what does return got to do inside catch.. please help me thanks in advance...
10 years ago
I have a servlet called
and a jsp called Uupdate.jsp


in Uupdate.jsp

I get the error...

but if i use Ulist in the places of Uattribute it works fine ... where am i going wrong

Thank you
in advance
10 years ago