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

What is jdbc and odbc?

879


Which is best database for java?

924


What are the components of jdbc?

937


How vendor Naming registry supports JNDI?

2124


What is jdbc class forname?

916


Why prepared statements are faster?

896


What do you understand by DDL and DML statements?

866


Why did my jdbc code throw a rollback sqlexception?

853


Is jdbc open source?

802


RowSetInternal caller and returns void. What can I do in the readData method?

936


Explain about the drive manager class working?

1004


Explain what should be done when a SQL exception is raised?

921


How MS-Access DB can be accessed over a network, using JDBC API?

2384


What is meant by jdbc?

879


I have the choice of manipulating database data using a byte[] or a java.sql.blob. Which has best performance?

870