Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. public class Buffer {
  2.  
  3. private int buff;
  4.  
  5. public Buffer(int buff) {
  6. super();
  7. this.buff = buff;
  8. }
  9.  
  10. public synchronized void put(int n)
  11. {
  12. buff=n;
  13. }
  14.  
  15. public synchronized int getBuff()
  16. {
  17. return buff;
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement