This is my code:
import java.sql.*;
public class NewClass {
public static void main(String[] args) {
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@//127.0.0.1:1521/xe","system","apnair9902");
java.sql.Statement stmt = con.createStatement();
ResultSet rs=stmt.executeQuery("select * from INV_MASTER");
while(rs.next())
System.out.println(rs.getString(1)+" "+rs.getString(2)+" "+rs.getString(3));
con.close();
}catch(Exception e){ System.out.println(e);}
}
}
`
I get the error:
java.sql.SQLException: ORA-00942: table or view does not exist
I have created and edited the table from browser but the program cannot find the database.