Viewing code of Check
// ------ ../cgi-bin/java/Check.java --------------
//--- Programmed By Rajesh -----
class Point{
int x;
int y;
boolean equals(Point p){
return ((x==p.x) && (y==p.y));
}
Point( int x, int y) {
this.x = x;
this.y = y;
}
}
class Line{
Point p1;
Point p2;
Line( Point a1, Point a2) {
p1 = a1;
p2 = a2;
}
boolean equals (Line l){
return( p1.equals(l.p1) && p2.equals(l.p2) );
}
}
class Check{
public static void main(String args[]){
Point p1 = new Point(2,2);
Point p2 = new Point (3,3);
Line yel1 = new Line(p1,p2);
Line yel2 = new Line(p1,p2);
System.out.println("l1 equals l2 : " + yel1.equals(yel2));
}
}
Home
Library Home:
- 1 Addition
- 2 BoxUser
- 3 BoxUser1
- 4 BoxUser2
- 5 Calc
- 6 Check
- 7 Circle
- 8 point
- 9 CircleMain
- 10 Clock
- 11 Compare
- 12 Constant
- 13 raan
- 14 CurentThreadDemo
- 15 sidd
- 16 CurrentThread
- 17 multi
- 18 CurrentThreadDemo
- 19 Driver
- 20 Fact
- 21 sirish
- 22 Factorial
- 23 Factorlial
- 24 FrameAndMenu
- 25 GF
- 26 GUI
- 27 GUITest
- 28 GrandFather
- 29 HariNarayanDemo
- 30 HariNarayanDemor
- 31 HariNayaranDemo
- 32 HariNayaranDemoR
- 33 HelloKU
- 34 HelloUser2
- 35 HelloWorld
- 36 HelloWorld2
- 37 Line
- 38 Line1
- 39 Main
- 40 MainCircle
- 41 MethodsTest
- 42 MyName
- 43 MyName1
- 44 ObjCreator
- 45 Recursion
- 46 Sort
- 47 multi1
- 48 StupidThreadDemoE
- 49 StupiedThread
- 50 StupiedThreadDemo
- 51 notepad
- 52 StupiedThreadDemoE
- 53 Swap
- 54 Symphony
- 55 anABC
- 56 calulation
- 57 creation
- 58 jframe
- 59 modifiedJFrame