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 the feature of jdbc v4?
How many types of resultset are there in jdbc?
What is createstatement method in java?
Why do we need jdbc driver?
Is jdbc faster than hibernate?
How can I determine the isolation levels supported by my DBMS?
How can we maintain the integrity of a database by using jdbc?
What is JDBC RowSet? What are different types of RowSet?
Which jdbc driver is the fastest driver?
What are the differences between setmaxrows(int) and setfetchsize(int)?
What are the components of jdbc?
Explain about the drive manager class working?
What is a merge field?
What is ojdbc14 jar?
What is the role of the jdbc drivermanager class?