This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hjj |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HiBye implements Runnable { | |
private String message; | |
private int times; | |
private long sleepTime; | |
public HiBye(String msg, int count, long sleep) { | |
message = msg; | |
times = count; | |
sleepTime = sleep; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.BufferedWriter; | |
import java.io.FileReader; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
class Data { | |
private String name; | |
private int english; | |
private int math; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NotTriangleException extends Exception { | |
public NotTriangleException(String message) { | |
super(message); | |
} | |
} | |
class EquilateralTriangleException extends Exception { | |
public EquilateralTriangleException(String message) { | |
super(message); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ex12_2 | |
class Max { | |
private int n1, n2; | |
public Max(int a, int b) { | |
n1 = a; | |
n2 = b; | |
} | |
public int compare() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CBox{ | |
int length; | |
int width; | |
int height; | |
public class Ex04{ | |
public static void main(String[] args) { | |
CBox box; | |
box = new CBox(); | |
box.length = 15; | |
box.width = 10; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class cbbb{ | |
double x; | |
double y; | |
public class Ex02{ | |
public static void main(String[] args) { | |
obj1 = new cbbb(); | |
obj2 = new cbbb(); | |
cbbb avg = new cbbb(); | |
obj1.x = 5.2; | |
obj1.y = 3.9; |