Advertisement
Dprogrammed1

java ques 12

Feb 22nd, 2019
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.26 KB | None | 0 0
  1. public static int foo(int a, String s)
  2. {
  3. s = “Yellow”;
  4. a=a+2;
  5. return a;
  6. }
  7. public static void bar()
  8. {
  9. int a=3;
  10. String s = “Blue”;
  11. a = foo(a,s);
  12. System.out.println(“a=+a+” s=+s);
  13. }
  14. public static void main(String args[])
  15. {
  16. bar();
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement