Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. Copyright (c) Xerox Corporation 1998-2002. All rights reserved.
  3. Use and copying of this software and preparation of derivative works based
  4. upon this software are permitted. Any distribution of this software or
  5. derivative works must comply with all applicable United States export control
  6. laws.
  7. This software is made available AS IS, and Xerox Corporation makes no warranty
  8. about the software, its performance or its conformity to any specification.
  9. */
  10. package tjp;
  11. public class Demo {
  12. static Demo d;
  13. public static void main(String[] args){
  14. new Demo().go();
  15. }
  16. void go(){
  17. d = new Demo();
  18. d.foo(1,d);
  19. System.out.println(d.bar(new Integer(3)));
  20. }
  21. void foo(int i, Object o){
  22. System.out.println("Demo.foo(" + i + ", " + o + ")\n");
  23. }
  24. String bar (Integer j){
  25. System.out.println("Demo.bar(" + j + ")\n");
  26. return "Demo.bar(" + j + ")";
  27. }
  28. }