MY code is: public class P1{
public static void main(String ar[])
{
class.forName("java.lang.String");
}
}
errors i got are :New.java:5: error: <identifier> expected
class.forName("java.lang.String");
^
New.java:5: error: invalid method declaration; return type
required
class.forName("java.lang.String");
^
New.java:5: error: illegal start of type
class.forName("java.lang.String");
^
New.java:7: error: reached end of file while parsing
}
^
4 errors
HELP ME>......
Answer Posted / salman
public class P1
{
public static void main(String args[])
{
try
{
Class.forName("java.lang.String");
}catch(Exception ex){}
}
}
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
Why do we need jdbc?
What are the advantages of collection pools?
What should be done for auto generating primary key id in a table ?
What are the advantages of using preparedstatement over statement?
How the JDBC application works?
Why do you use a data source object for a connection?
What are the considerations for deciding on transaction boundaries?
What is jdbc driver manager?
What does connection pooling mean ?
What is database connection pooling? Advantages of using a connection pool?
Explain creation of statement object with connection method create method with help of an example.
Where jdbc drivermanager class is used?
What does executeupdate return in jdbc?
What is JDBC DataSource and what are it’s benefits?
How do I connect to jdbc?