No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
10 Posted Topics
Hi, How good is the TCL scripting language? Is it a hot trend in market? What are the jobs prospectus after learning this language?
Hi,Norm jon, I am posting a new thread for tagging the code accordingly. Hope this helps out. 1.My ball is not bouncing within the circle i drew.(Within circle 2).It just goes vaguely toward one direction and comes back.I want the ball to bounce randomly.Just like in the game ball and …
can any one help!! Expand Post (Toggle Plain Text) import java.awt.*; import java.awt.event.*; import java.awt.Color; import javax.swing.*; import java.awt.Frame; import java.awt.geom.*; class BallEntity/*THE BALL CLASS*/ { private int top=0,left=0,height=0,width=0; //getter methods public int getTop() { return top; } public int getLeft() { return left; } public int getHeight() { return …
import java.awt.*; import java.awt.event.*; import java.awt.Color; import javax.swing.*; import java.awt.Frame; import java.awt.geom.*; class BallEntity/*THE BALL CLASS*/ { private int top=0,left=0,height=0,width=0; //getter methods public int getTop() { return top; } public int getLeft() { return left; } public int getHeight() { return height; } public int getWidth() { return width; } …
import java.util.*; class Data { int num; String name; Data(String na) { name=na; } public int hashCode() { return 5; } public boolean equals(Object o) { if(o instanceof Data && ((Data)o).name==this.name) return true; else return false; } } public class Sandeep { public static void main(String[] args) { HashMap map=new …
class Superclass { void display() { System.out.println("Super"); } } class Sub1 extends Superclass { void display() { System.out.println("sub class1"); } } class Sub2 extends Sub1 { void display() { System.out.println("Sub class2"); } void display2() { System.out.println("Second method"); } } public class reference { public static void main(String[] args) { Superclass …
class C{ public static void main(String a[]) { int i1=9; int i2; if(i1>3) { i2=8; } System.out.println(i2); }}
public class Sorting { public static void main(String[] args) { int j=10; int[] arr=new int[10]; for(int i=0;i<arr.length;i++) { arr[i]=j; j+=10; } int num=Integer.parseInt(args[0]); bsearch(arr,0,10,num); } static void bsearch(int[] arr2,int first,int last,int key) { while(first<=last) { int mid=(first+last)/2; if(key==arr2[mid]) { System.out.println("Found the key"); } else if(key<arr2[mid]) { last=mid-1; } else if(key>arr2[mid]) …
Your answer to first question. 1.this.x=y vs x=y well x=y simply means u are assigning the value of y to x.No probs. 2.But this.x=y.'this' keyword is used to tell the JVM that u are referring to the instance variable belonging to a that particular class.eg: class Example { int x; …
Hi, I don think fr u to b an excellent programmer u shld directly jump for projects.Go for Small prgms .Try to read this elementary book by Kathy Sierra and simultaneously understand pgms.There are lot of sites for u out there to help u.just google it. try to understand pgms …
The End.
aditya027