-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMethods.java
More file actions
42 lines (37 loc) · 1.01 KB
/
Methods.java
File metadata and controls
42 lines (37 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.company;
public class Methods {
//static void change(int x){
// x = 98;
//}
static void change2(int[] arr){
arr[0] = 98;
}
// static void joke(){
// System.out.println("An exercise for " +
// "people who are out of shape: Begin with a " +
// "five-pound potato bag in each hand. Extend " +
// "your arms straight out from your sides, hold them there for...");
// }
// static int logic(int x, int y){
// int answer = 0;
// if (x>y){
// answer = x+y;
// }else {
// answer = (x+y)*5;
// }
// return answer;
// }
public static void main(String[] args) {
int [] marks = {23,23,32,34,98};
// int a = 11;
// int b = 10;
// int c = logic(a, b);
// System.out.println(c);
// joke();
// int l = 45;
// change(l);
// System.out.println(l);
change2(marks);
System.out.println(marks[0]);
}
}