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
What is jdbc and odbc?
Which is best database for java?
What are the components of jdbc?
How vendor Naming registry supports JNDI?
What is jdbc class forname?
Why prepared statements are faster?
What do you understand by DDL and DML statements?
Why did my jdbc code throw a rollback sqlexception?
Is jdbc open source?
RowSetInternal caller and returns void. What can I do in the readData method?
Explain about the drive manager class working?
Explain what should be done when a SQL exception is raised?
How MS-Access DB can be accessed over a network, using JDBC API?
What is meant by jdbc?
I have the choice of manipulating database data using a byte[] or a java.sql.blob. Which has best performance?