thanassis.com
home
blog
Online Games
Sudoku
Ivory Tower
Web Hangman
Software
Java
Object Oriented
Mobiles / J2ME
Research
C.S. Resources
Galleries
Greece
Music
Photography
Art
Persona
l
About me
Useful Links
Contact
Site
Download
Latest News
Singleton Example (2/2)
public boolean requestLock() {
if (inUse == false) {
acceptedRQs++;
inUse = true;
return true;
} else {
deniedRQs++;
return false;
}
}
public void releaseLock() {
inUse = false;
}
}
Previous slide
Next slide
Back to first slide
View graphic version
Web
this site
Thanassis Blog News
In the News
Deep impact smashes comet
3 Florida shark attacks in a week
Mad Cow
summit in Scotland
Search the Archives