Repository navigation
Expand file tree
/
Copy pathConcetric.java
More file actions
96 lines (78 loc) · 1.72 KB
/
Copy pathConcetric.java
File metadata and controls
96 lines (78 loc) · 1.72 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package obj;
import interfaces.FunctionalInterB;
public class Concetric{
public static void main(String[] args) {
// TODO Auto-generated method stub
int ap[]= {1,2,3,1,2,4};
int c=Math.abs(ap[0]-ap[1]);
for(int i=1;i<ap.length-1;i++)
{
if(Math.abs(ap[i]-ap[i+1])>c)
{
c=Math.abs(ap[i]-ap[i+1]);
}
}
System.out.println(c);
System.out.println(test1(1,23,4,5));
System.out.println(test2(ap));
foo(null);
sum(20, 20);
try
{
int x = 0;
int y = 5 / x;
}
catch (Exception e)
{
System.out.println("Exception");
}
/*
* catch (ArithmeticException ae) { System.out.println(" Arithmetic Exception");
* }
*/
System.out.println("finished");
try
{
return;
}
finally
{
System.out.println( "Finally" );
}
}
public static int test1(int...a)
{
System.out.println("tet1"+a[0]);
return 0;
}
public static int test2(int []a)
{
System.out.println("tet2"+a[0]);
return 0;
}
// static void sum(int a,long b){System.out.println("a method invoked");}
// static void sum(long a,int b){System.out.println("b method invoked");}
static void sum(long a,long b){System.out.println("c method invoked");}
public void test(int x)
{
int odd = 1;
if(true)
{
System.out.println("odd");
}
else
{
System.out.println("even");
}
}
public static void foo(Object o) {
System.out.println("NUll PARAMETER Object argument");
}
public static void foo(String s) {
System.out.println("NUll PARAMETER String argument");
}
/*
* public static void foo(StringBuffer i){
* System.out.println("StringBuffer impl"); }
*/
}

