-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathObjects.java
More file actions
37 lines (28 loc) · 749 Bytes
/
Copy pathObjects.java
File metadata and controls
37 lines (28 loc) · 749 Bytes
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
import java.util.*;
public class Objects
{
public static void main(String [] args)
{
Scanner sc= new Scanner(System.in);
ramo("WHAT\'s UUUUUUUUP!",7);
System.out.println(add2(9,1666));
System.out.println(str("Have a terrible day\n"));
sc.close();
}
public static void ramo(String myString, int l)
{
for(int i=0;i<l;i++)
{
System.out.println(myString);
}
}
//Method with integer return Type
public static int add2(int x, int y)
{
return x+y;
}
public static String str(String x)
{
return x+" is the string you entered for this function which outputs a string";
}
}