Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why do we need jdbc?

1053


What are the advantages of collection pools?

1035


What should be done for auto generating primary key id in a table ?

967


What are the advantages of using preparedstatement over statement?

1001


How the JDBC application works?

945


Why do you use a data source object for a connection?

1023


What are the considerations for deciding on transaction boundaries?

1002


What is jdbc driver manager?

932


What does connection pooling mean ?

977


What is database connection pooling? Advantages of using a connection pool?

1044


Explain creation of statement object with connection method create method with help of an example.

961


Where jdbc drivermanager class is used?

954


What does executeupdate return in jdbc?

965


What is JDBC DataSource and what are it’s benefits?

1201


How do I connect to jdbc?

933