-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.java
More file actions
58 lines (53 loc) · 1.32 KB
/
Copy pathTest.java
File metadata and controls
58 lines (53 loc) · 1.32 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
package com.practice;
import java.util.*;
/**
* @CreatedBy cx
* @CreatedTime [Date]
* @description
*/
public class Test {
public static void main(String [] args){
// Map map = new HashMap();
// Collection collection= new LinkedList();
// System.out.println(Math.round(-11.6));
// System.out.println(new B().getValue());
System.out.println(Integer.toBinaryString(-5>>>2));
System.out.println((-5)>>>2);
}
static class A{
protected int value;
public A(int v) {
setValue(v);
}
public void setValue(int value){
this.value = value;
}
public int getValue(){
try{
value++;
return value;
} catch(Exception e){
System.out.println(e.toString());
} finally {
this.setValue(value);
System.out.println(value);
}
return value;
}
}
static class B extends A{
public B() {
super(5);
setValue(getValue() - 3);
}
@Override
public void setValue(int value){
super.setValue(2 * value);
}
}
public int maxArea(int a[][]){
int n=a.length;
int m=a[0].length;
return 0;
}
}