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

difference between byte stream class and character stream class?

4556


What are the differences between c++ and java?

1135


What is difference overloading and overriding?

1166


Why char array is favored over string for the storage of passwords?

1072


what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent

2173


What is Major and importance difference between for and foreach loop ?

1145


What does @param args mean in java?

1056


What’s the difference between unit, integration and functional testing?

1104


What is thread safe singleton?

943


Explain runtime exceptions?

1177


What is the purpose of methodology?

1080


How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?

1444


What is valid keyword in java?

997


How many ways can we create singleton class?

966


Explain about map interface in java?

993