Forum: Java May 28th, 2008 |
| Replies: 1 Views: 3,055 got it... System.arraycopy |
Forum: Java May 28th, 2008 |
| Replies: 1 Views: 3,055 i basically have a long array i want to copy to another array object. does this copy by refrence? i know java doesnt do refrences but i read somewhere it would pass by refrence.
char[][][]... |
Forum: Java Feb 17th, 2008 |
| Replies: 2 Views: 2,879 thanks for the advice on object but it does function how i want it to. in each category object i have its name, and min/max values. basically i will be adding a category to an arrayList. then i will... |
Forum: Java Feb 17th, 2008 |
| Replies: 2 Views: 2,879 Hey, so this is killing me, I have a class category, and the equals looks like this:
public boolean equals(String s){
return s.equals(name);
}
this is because i have an arrayList of... |
Forum: Java Dec 11th, 2007 |
| Replies: 13 Views: 1,592 Also do all of the sub classes have the same methods? because if you define it as a doctor and dont have something like isJanitor() then it will give you an error. |
Forum: Java Dec 10th, 2007 |
| Replies: 13 Views: 1,592 Try testing it without using the employee class. does it still give you that error? |
Forum: Java Dec 10th, 2007 |
| Replies: 13 Views: 1,592 Your child class should extend object... unless employee does? try doing that... the odd thing is that technically everything is an object right? |
Forum: Java Dec 10th, 2007 |
| Replies: 13 Views: 1,592 hmm..
can you show me part of your code? say one of the classes and how your initializing the object. |
Forum: Java Dec 10th, 2007 |
| Replies: 13 Views: 1,592 in your child classes did you extend object? |
Forum: Java Nov 20th, 2007 |
| Replies: 0 Views: 2,526 Hey, Im having a problem getting my applet to repaint after it is resized. + and - buttons resize it but sometimes it wont get bigger or repaint.
here is the src for the applet
private... |
Forum: Java Oct 28th, 2007 |
| Replies: 3 Views: 2,367 what do you mean by the first one and the second one? |
Forum: Java Oct 28th, 2007 |
| Replies: 1 Views: 2,034 try this
public class Sort{
public static void main(String [] args){
int[]A={3,7,8,1,4,9,10};
A=sort(A);
for(int i=0;i<A.length;i++){
... |
Forum: Java Oct 26th, 2007 |
| Replies: 2 Views: 714 you should probabally stick within your comfort zone |
Forum: Java Oct 25th, 2007 |
| Replies: 3 Views: 623 |
Forum: Java Oct 23rd, 2007 |
| Replies: 3 Views: 1,969 beter get started, come back when you have a problem and you've at least tried |
Forum: Java Oct 23rd, 2007 |
| Replies: 8 Views: 1,849 no it wouldnt matter, it only matters if you define the same variable twice inside of a method. |
Forum: Java Oct 23rd, 2007 |
| Replies: 8 Views: 1,849 how would you access them without class names? can you give me an example? |
Forum: Java Oct 23rd, 2007 |
| Replies: 7 Views: 912 |
Forum: Java Oct 23rd, 2007 |
| Replies: 7 Views: 912 You can do Double.parseDouble instead of Integer.parseInt |
Forum: Java Oct 23rd, 2007 |
| Replies: 7 Views: 912 hmm,
There is no clean way i can think of, but you can do
try{
int num=Integer.parseInt(firstDenominator.getText());
//if it gets to here its valid
}catch(NumberFormatException e){
//invalid... |
Forum: Java Oct 23rd, 2007 |
| Replies: 7 Views: 912 basically you need to check if they have a value. if the enter nothing then the string will be null or "". If you try to set a integer equal to null, you will get an exception, so you need to check... |
Forum: Java Oct 18th, 2007 |
| Replies: 4 Views: 4,156 import javax.swing.JOptionPane;
public class GPA {
private double gpa = 0.0;
public GPA() {
}
public String UserInput(){ |
Forum: Java Oct 14th, 2007 |
| Replies: 16 Views: 1,857 didnt microsoft already bootleg it? like they killed c++ with c# (Which sucks) And then the made like j++ and got sued over it or something. is there any chance (no) that j++ could take over java? |
Forum: Java Oct 13th, 2007 |
| Replies: 2 Views: 1,631 check out http://java.sun.com/j2se/1.4.2/docs/api/java/net/HttpURLConnection.html
hopefully you at least get javadoc |
Forum: Java Oct 13th, 2007 |
| Replies: 1 Views: 1,625 im not 100% sure on this but i think when you extend jframe, the method used to init the window is called initComponents. So when you override that it is called automatically. On line 54 it is the... |
Forum: Java Oct 13th, 2007 |
| Replies: 4 Views: 4,516 please use code tags :-)
public class MyNew extends JFrame implements ActionListener
{
public static void main(String[] args)
{
publicMyNew start= newMyNew();
... |
Forum: Java Oct 12th, 2007 |
| Replies: 31 Views: 3,476 can you make those photos larger? |
Forum: Java Oct 10th, 2007 |
| Replies: 3 Views: 972 As far as i know getText doesnt have any parameters. you would just say
String x=box.getText();
Long l= Long.parseLong(s); |
Forum: Java Oct 10th, 2007 |
| Replies: 4 Views: 1,135 textbox.setText(long.toString()); |
Forum: Java Oct 10th, 2007 |
| Replies: 1 Views: 506 Its used in jsp, you may want to ask this in the jsp forum, and there are some helpful hints on google |
Forum: Java Oct 10th, 2007 |
| Replies: 5 Views: 798 Thats kinda harsh...
I got fine using netbeans when i first learned, it will show you errors and possible corrections. If you already know how to use notpad and cmd prompt then it cant hurt. In fact... |
Forum: Java Oct 9th, 2007 |
| Replies: 3 Views: 1,437 I think your problem is your not making the thread do the typing, so look into making a new thread and making it write to the textbox then sleep.. Im not 100% sure how to though. |
Forum: Java Oct 7th, 2007 |
| Replies: 2 Views: 8,931 So... you've got a few problems with your code... one really really bad thing is that you make each method throw an exception. that means you will never see if there are any errors. You were getting... |
Forum: Java Oct 6th, 2007 |
| Replies: 1 Views: 597 import java.io.*;
public class myFLAMES {
public static void main(String args[]) throws Exception
{
DataInputStream input=new DataInputStream(System.in);
int ctr=0;
... |
Forum: Java Oct 6th, 2007 |
| Replies: 11 Views: 2,000 // Displaying multiple strings
import javax.swing.*; // to use JOptionPane.show InputDialog box
public class a3
{
public static void main( String[] args )//args is an array. to... |
Forum: Java Oct 6th, 2007 |
| Replies: 11 Views: 2,000 also isnt the main methos suppose to be
main(String[] args) |
Forum: Java Oct 3rd, 2007 |
| Replies: 9 Views: 891 public static int i(int i);//<--delete that
{
if (i == 0)
{
return i;
}
}
public static void... |
Forum: Java Oct 3rd, 2007 |
| Replies: 9 Views: 891 public class Five {
// Declare Variable
int i;
public static int iMethod(int i);
{
if (i == 0){
return i;
} |
Forum: Java Oct 3rd, 2007 |
| Replies: 4 Views: 985 BarChart uses graphics2d to draw itself, so you pass on g2 and g2 draws a barchart |