Hi All,
Here is the code from today's lecture....
Enjoy the break!
Regards,
- DL
class Radix {
public static void main(String
args[]) {
int x = 255;
int y = 1;
x = x | y;
print(Integer.toString(x,2));
print(Integer.toString(x,8));
print(Integer.toString(x,16));
print(Integer.toString(x,32));
}
static void print(Object o) {
System.out.println(o);
}
}
interface Drawable {
void draw();
}
abstract class Erasable
implements Drawable {
public void hi() {
System.out.println("Hello");
}
}
class Line extends Erasable {
public void draw(){}
}
interface A {
public static final double i=10;
void help();
}
interface B {
public static final int ii=10;
void help();
}
interface C extends A,B {};
public class Wild implements C {
public static void main
(String args[]) {
System.out.println(i);
}
public void help(){}
}
public class Foo {
int i = 17;
}
public class Fee {
public static void main(
String args[]) {
Foo f1 = new Foo();
Foo f2 = new Foo();
f1.i = 100;
System.out.println(
f1.i);
System.out.println(
f2.i);
}
}
|