• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Couple of questions

 
Ranch Hand
Posts: 464
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If a synchronized method throws an exception the thread give up the lock.. TRUE or FALSE
Anonymous class cant be declared as static ... TRUE or FALSE

Please let me know
Ragu
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If a synchronized method throws an exception the thread give up the lock.. TRUE or FALSE
TRUE, From JLS 17.3


...
If execution of the method's body is ever completed, either normally or abruptly, an unlock action is automatically performed on that same lock.


Anonymous class cant be declared as static ... TRUE or FALSE
TRUE, From JLS 15.9.5:


15.9.5 Anonymous Class Declarations
An anonymous class declaration is automatically derived from a class instance creation expression by the compiler.
An anonymous class is never abstract (�8.1.1.1). An anonymous class is always an inner class (�8.1.2); it is never static (�8.1.1, �8.5.2). An anonymous class is always
implicitly final (�8.1.1.2).


HIH

------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic