Hey actually it did work out...sorry the first time I tested it my program had problem in another part that I didn't notice...but now I figured out what the problem was, it works just fine :)
thanks...
Type: Posts; User: ashl7
Hey actually it did work out...sorry the first time I tested it my program had problem in another part that I didn't notice...but now I figured out what the problem was, it works just fine :)
thanks...
yeah
but I'm looking for a way to display all the elements of the array on JTextField
like this:
a1jTextArea.setText(a[1].toString + " " + a[2].toString+ " " +.........a[10].toString)
which...
tnx, but didn't quite get that: you mean like this: a1jTextArea.setText(a[1].toString);
any idea about the other questions?
I guess I need your help again!
this is the code for my Rational class that I asked in the first post, which is perfectly fine :>
public class Rational{
private long numerator;
...
hmm, thanks much...got it!
now why does it have to be "public static" and not just public?
no wasn't trying to implement Comparable interface...I deleted that part from my program....just want to make a regular method to compare two rationals!
hmmm, tnx
I'm not finished with this one yet! I will add those methods later, but it won't give me a compile error, or run error later if I don't add them right?
also, I made this method for...
Hi...been a while, but I was working on my code, and learned some new stuff!!
I've wrote this code so far:
public class Rational extends Number implements Comparable<Rational>{
...
um I know why it's not a value, cuz it's a reference variable! that's not what my question is about, I'm more asking for a solution to get a rational number by calling a constructor Rational!
I have...
Hi, although by now I know enough about making methods and constructors, they're definition...I don't know why I have problem with this exercise of my teacher...now I don't want anyone to write the...
Hi, I have this exercise and kinda confuses me...I needed some help from professionals to clear things up for me(this is a school project, we haven't finished the course yet, so maybe some of the...
changed it, still gives me error!!!!
but found it finally
same thing u said about arrays(confusing length and indexes)...I made a mistake in declaring the matrix array...it should have been a...
GODDAMN IT!!!!!
wait but I changed it to 9, still get the same error, except it's 9 instead of 8 in the error: java.lang.ArrayIndexOutOfBoundsException: 8
intBet is the user's input...the program is part of a GUI made by netBeans GUI maker!!! so I wasn't sure I should put it all here!
--- Update ---
@Chris Brown
I see what you mean
I got my...
looks like I'm actually having a problem
this is the code I wrote so far in order to get a matrix:
package matrix.inverse;
import java.util.*;
I think I'm good (for now lol)....I was wondering how to use the method String.split()....did some google and found out it has to be like: StringName.split(" "), with space in between quotation...
sorry for the delay...and thanks for the responses
all the digits after a space has to be considered one number, for example 1 23 4 7 568 should be considered as 1,23,4,7,568....so the element of...
Hi, I'm working on a program about matrices...for getting the different elements of the matrix I must prompt the user as below:
prompt example: Enter a11, a12, a13, a21, a22, a23, a31, a32, a33: ...
Hi again
I know it's been a while, but wrote a piece of code, and can't find what my mistake is!
it's about variables again
public int result;
private void...
Oooooh "the same class or package"...now I get it...and thanks for the link
Ok thanks a lot
So you mean in general, we only use public, private, protected,etc... only when we want to make a class that is going to be used in some other program, or external codes?! in this...
Hi,I needed to know why we should use modifiers for variables?
I have this piece of code:
import java.util.*;
public class Test{
public String student;
Hi everyone
I was studying about data types in Java, I have some basic questions
what is the meaning of default value for a data type?! what's the use of it?
for example:
default value of int...
Got it, I'm so stupid and thanks much :D
it was in my if loop...I should have had variable u instead of j!