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 the feature of jdbc v4?

1149


How many types of resultset are there in jdbc?

970


What is createstatement method in java?

966


Why do we need jdbc driver?

893


Is jdbc faster than hibernate?

999


How can I determine the isolation levels supported by my DBMS?

991


How can we maintain the integrity of a database by using jdbc?

1079


What is JDBC RowSet? What are different types of RowSet?

1095


Which jdbc driver is the fastest driver?

1027


What are the differences between setmaxrows(int) and setfetchsize(int)?

1065


What are the components of jdbc?

989


Explain about the drive manager class working?

1116


What is a merge field?

940


What is ojdbc14 jar?

916


What is the role of the jdbc drivermanager class?

948