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...

wat is class level lock and object level lock

Answer Posted / sitaram

class StringSample{
static void method1(){
System.out.println("classlevel...");
}
void method2(){
System.out.println("object level...");
}

}
public class StringDemo{
public static void main(String[] args) {
StringSample.method1(); // class level
// StringSample.method2(); //error
StringSample s2 = new StringSample();
s2.method2(); //object level

}
}

Is This Answer Correct ?    8 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of return statement?

1122


What is externalizable interface?

1141


what is thread? : Java thread

1038


What is meant by 'bit masking' in java?

1255


Can we execute a program without main() method?

1084


What is api data?

1047


how can you take care of mutual exclusion using java threads? : Java thread

1093


What is difference between float and double?

1009


When will we prefer to use set and list in java and why?

1016


Garbage collection in java?

1065


how to deploy apache tomcat server to weblogic server in java

2150


Where will it be used?

1990


Can we have multiple public classes in a java source file?

1269


What is command line used for?

1135


What does int argc char * argv [] mean?

1048