finalA - " x"" y public static void method1(int...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
public class finalA { public static void main(String[] args) { int x = 3; int y = 9; method1(x, y); System.out.println("after method1: " + x + " " + y); x = 3; y = 9; x = method2(x, y); System.out.println("after method2:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: " + x + " " + y); } public static void method1(int x, int y) { x = x + 2; y = x * 10; } public static int method2(int x, int y) { y = y * 2; x = y - 5; return y; } }...
View Full Document

This note was uploaded on 04/03/2010 for the course COMPSCI 600.107 taught by Professor Houlahan during the Spring '08 term at Johns Hopkins.

Ask a homework question - tutors are online