|
@@ -0,0 +1,26 @@
|
|
1
|
+PPrimitiveParameters.java program from open Texas code
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+Class name: PrimitiveParameters
|
|
5
|
+
|
|
6
|
+Methods: go(),falseSwap(int x, int y),moreParameters(int a, int b).
|
|
7
|
+All are static methods with no returns, all three static methods have input parameters.
|
|
8
|
+
|
|
9
|
+- [ ] go() method :
|
|
10
|
+ Fields: x and y .
|
|
11
|
+ Primitive Type : Integer.
|
|
12
|
+Initialize the values of x and y. Calling the methods falseSwap(int x, int y),moreParameters(int a, int b)
|
|
13
|
+and print the values before and after each of these methods.
|
|
14
|
+
|
|
15
|
+- [ ] falseSwap(int x, int y)
|
|
16
|
+
|
|
17
|
+Swap the values of x and y using temp field.
|
|
18
|
+Print the values of x and y before and after.
|
|
19
|
+
|
|
20
|
+- [ ] moreParameters (int a, int b) method
|
|
21
|
+
|
|
22
|
+Product of a and b is assigned to a.
|
|
23
|
+Assigned 12 to b.
|
|
24
|
+Swap the values of a and b using falseSwap() method.
|
|
25
|
+
|
|
26
|
+Print the values of a and b.
|