Java Programming Home Page: Archive: Message #52

Date: Mar 09 2000 22:00:05 EST
From: "Java Programming" <javaProgramming-owner@listbot.com>
Subject: code from 3/9/00

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);
	}
}