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
How to know howmuch data is truncated?
What is database deadlock ? How can we avoid them?
What are the differences between statement and preparedstatement interface?
Is jdbc a web technology?
What is a jdbc connection?
What is execute in java?
What does setautocommit do?
What are the differences between setmaxrows(int) and setfetchsize(int)?
How can I get or redirect the log used by DriverManager and JDBC drivers?
What does connection pooling mean ?
What is the major difference between java.util.date and java.sql.date data type?
If you are given a choice to implement the code to either insert a record or update if already exist, which approach will you follow ?
How to connect html page to database using jdbc?
What are the types of jdbc drivers that exist?
What is the role of jdbc drivermanager class?