169 Posted Topics
Re: 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 … | |
Re: 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 … | |
Re: 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!! | |
Re: 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) … | |
![]() | |
Re: Welcome to DaniWeb Alvin (",) Hope you learn a lot from our forums (",) Dont be shy to ask for help ok?? (",) | |
Re: Welcome to DaniWeb suraj (",) Hope we can help you satisfy your Java madness (",) | |
Re: 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. | |
Re: 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 … | |
Re: Why do you need a never ending array?? Does this mean that you will create a never ending program?? | |
Re: Syntax seems good. I think this code will work (",) Good luck!! | |
Re: 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 … | |
Re: Is it possible that somewhere in your code, fine is being initialized to zero?? | |
Re: 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 (",) | |
Re: 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 … | |
Re: Ive encountered this problem before. Just forgot where I found the code. Try to Google 'java FTP' or 'apache ftp'. | |
Re: 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 (",) | |
Re: 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? | |
Re: @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 … | |
Re: 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. | |
Re: We're glad you figured it out. Now please mark this thread as SOLVED. | |
Re: 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 … | |
Re: I think you need to compare a with i since i is your counter. And by the way, what is a perfect integer?? | |
Re: 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 (",) | |
Re: 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?? | |
Re: Try studying GUI's using java. With regards to the text files, try searching for 'Read/write text file java'. | |
Re: If you want an Input Box to input your sentence then you need to build a GUI. Try searching for JTextField. | |
Re: 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. | |
Re: So what's wrong with this code??[CODE]msgLabel.setFont(new Font("Serif", Font.BOLD, 14));[/CODE] Its not working?? | |
The End.