when iam runnig the code i will get the error Exception in thread "main" java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
package com.karunakar.jdbc;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class SelectAll {
public static void main(String[] args) throws SQLException {
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe"," system","1234") ;
Statement st=con.createStatement();
ResultSet rs=st.executeQuery( " select*from stu");
while( rs.next())
{
System.out.println(rs.getInt(1)+".."+rs.getString(2));
}
con.close();
}
}