Browse Source

primitive parameters

Yesoda Sanka 6 years ago
parent
commit
317dd73d9e
3 changed files with 26 additions and 0 deletions
  1. BIN
      .DS_Store
  2. BIN
      CodeSamples/.DS_Store
  3. 26
    0
      MyFile.md

BIN
.DS_Store View File


BIN
CodeSamples/.DS_Store View File


+ 26
- 0
MyFile.md View File

@@ -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.