169 Posted Topics

Member Avatar for yup790

I noticed that in line 24 [CODE]int[] results = new int[poss];[/CODE] you create an array results with size poss. then in line 40 [CODE] for(int z = 0; z <= poss ;z++){ String whatever = z + " : " + results[z]; comps[z] = whatever; } [/CODE] For example, poss …

Member Avatar for leiger
0
178
Member Avatar for Lxyslckr

Prior to #3 and #4, you have #2. In #2, it is assumed that you now have a valid card. For example you got A (S) (ace of spades). Then you need to construct a method isRed that accepts a String parameter (which is your card) and returns either true …

Member Avatar for Eric Cute
0
218
Member Avatar for Setvir
Member Avatar for schoolbus11

To know the lowest and the highest you can do a [CODE]Arrays.sort(score);[/CODE] This will sort your array so that score[0] will be the lowest and score[score.length-1] is the highest (",) Cheers!!

Member Avatar for Overbooked
0
111
Member Avatar for sazad1

I think using java.io is the simplest. [CODE] public class FtpConnectDemo { public static void main (String[] args) { FTPClient client = new FTPClient(); FileInputStream fis = null; FileOutputStream fos = null; InputStream is = null; OutputStream os = null; try { client.connect("ftp.host"); boolean login = client.login("Anonymous", ""); if (login) …

Member Avatar for sazad1
-1
190
Member Avatar for barry.birchall
Member Avatar for apojigo
0
83
Member Avatar for rafi1082
Member Avatar for alvin090691

Welcome to DaniWeb Alvin (",) Hope you learn a lot from our forums (",) Dont be shy to ask for help ok?? (",)

Member Avatar for Overbooked
0
39
Member Avatar for adaz
Member Avatar for mankis
Member Avatar for Overbooked
0
59
Member Avatar for suraj_p

Welcome to DaniWeb suraj (",) Hope we can help you satisfy your Java madness (",)

Member Avatar for Overbooked
0
159
Member Avatar for ymb6

Welcome to DaniWeb rehan (",). Good to have you on our forums.

Member Avatar for Overbooked
0
34
Member Avatar for shinjun
Member Avatar for Overbooked
0
39
Member Avatar for rolyestemonio
Member Avatar for Roy1287

What do you mean its looping?? Try displaying the values that you read from the file after every read [CODE]System.out.println(accountNumber);[/CODE] and see if it reads all your data and to verify if your program is indeed looping.

Member Avatar for kramerd
0
831
Member Avatar for DallasFan3

Basing from your coding, I think that you assume that when you write the method, the program will execute it. Correct me if Im wrong okie?? You see, writing a method in your program doesnt necessarity mean that your program will execute it. You have to call that method inside …

Member Avatar for Eric Cute
0
2K
Member Avatar for javajavajava

Why do you need a never ending array?? Does this mean that you will create a never ending program??

Member Avatar for Eric Cute
0
218
Member Avatar for ssubnel
Member Avatar for ssubnel
0
132
Member Avatar for spades0001
Member Avatar for serph09

1. Why not start your for loop with 0 then end it with i < TRIES rather thatn starting with 1 then nding with i <= TRIES?? 2. For casting your die faces into an array like what Dhruv Gairola said, 1st you need to create an array of size …

Member Avatar for kezkez
0
184
Member Avatar for plasticfood

Is it possible that somewhere in your code, fine is being initialized to zero??

Member Avatar for Taywin
0
136
Member Avatar for RaghadAsfar

You can use the if statements inside your methods. In what particular line of code do you encounter the illegal start of expression. If you have a code pls post it here (",)

Member Avatar for javaAddict
0
79
Member Avatar for DallasFan3

1. You need to get the word from the user. 2. Create a method where you will pass this word. 3. In your method check if the 1st char is a bowel and then follow the rules. Try to coding 1st then if you encounter any errors or youre stucked …

Member Avatar for peter_budo
0
726
Member Avatar for LianaN

Ive encountered this problem before. Just forgot where I found the code. Try to Google 'java FTP' or 'apache ftp'.

Member Avatar for LianaN
0
3K
Member Avatar for DallasFan3

What do you mean by stars going down instead of to the right?? Can you please show the output of your code?? Im guessing base on your code that if user inputs 6, the output is: * * * * * * But Im just guessing (",)

Member Avatar for wilsonz91
0
1K
Member Avatar for rudomsindo
Member Avatar for chmo

So you want to prompt your user to provide a band name and band description, then after you want to add it into your bands.txt?

Member Avatar for masijade
0
544
Member Avatar for laringold
Member Avatar for cathy2
Member Avatar for iamubiquitous
Member Avatar for Eric Cute
0
137
Member Avatar for RoseMary3
Member Avatar for sanjaysush
Member Avatar for ajay_tabbu

@B.A.A, please start another thread for your topic. Your post is not related to this thread. To answer your question, try viewing some tutorials on java so that you will learn how to write a java program on your own and then post your code here if you got stucked …

Member Avatar for masijade
0
208
Member Avatar for etrac1912

You can follow this example. [CODE] DecimalFormat nf = new DecimalFormat("#,###,###,###,##0.##"); return nf.format(your_integer)); [/CODE] But to know more about the DecimalFormat, follow [I]masijade[/I] and read the API docs.

Member Avatar for Eric Cute
0
97
Member Avatar for frankel81
Member Avatar for Eric Cute
0
150
Member Avatar for Chalandria

1. First, display menu should return a char so it should be[CODE]public static char displayMenu()[/CODE]. 2. Then you need to enclose it in a dowhile loop so that if user does not enter (FC) then it will not terminate. Do while structure is [CODE]do { // your input method here …

Member Avatar for Eric Cute
0
273
Member Avatar for hassin

I think you need to compare a with i since i is your counter. And by the way, what is a perfect integer??

Member Avatar for Buffalo101
0
124
Member Avatar for Intrade
Member Avatar for keruhos
Member Avatar for Memphis_212
Member Avatar for stubee_1975
Member Avatar for HaKoNa MaTaTa
Member Avatar for WILARD428

Hi Bob. Welcome to DaniWeb (",). Hope we can help you with your computer/programming issues. Feel free to ask us anything. DaniWeb is full of people who are very much willing to help you (",)

Member Avatar for WASDted
0
97
Member Avatar for homeryansta
Member Avatar for blurX

If I understood your problem correctly, you want to convert a given character to create a phone-number. The number is the number associated with that character in a cellphone keypad?? Is that correct?? For example, you want to convert blurXposter to 258-797678-37??

Member Avatar for group256
0
109
Member Avatar for gedas

Try studying GUI's using java. With regards to the text files, try searching for 'Read/write text file java'.

Member Avatar for Eric Cute
0
50
Member Avatar for computercoder

If you want an Input Box to input your sentence then you need to build a GUI. Try searching for JTextField.

Member Avatar for Eric Cute
0
106
Member Avatar for spades0001

With the number of days, consult your pc calendar. To determine if year is a leap year. 1.if divisible by 400, leap year. 2. else, if div by 100, not leap year 3. else, if div by 4, leap year 4. else, not leap year.

Member Avatar for Taywin
0
92
Member Avatar for kurmadu

So what's wrong with this code??[CODE]msgLabel.setFont(new Font("Serif", Font.BOLD, 14));[/CODE] Its not working??

Member Avatar for Eric Cute
0
146
Member Avatar for abi62

The End.