32,204 Topics
| |
only scanners, strings, for loops, while loops, and if/else statements are allowed. 1. main method. In the main program declare a Scanner variable that is hooked up to System.in. You need to include the line of code import java.util.*; at the top of your program. Pass the Scanner object you … | |
How can i develop my logic to develop any software? i am study well but then also can not did it properly. You have any solution about that. how can develop software using C#,java ,etc other. | |
Hey, How do you go about proving that log(n!) is big Theta of n log n? | |
I am trying to make a very simple program for a school assignment. I simply need to display 3 random icons of playing cards. All the icons are stored in an image file as 1.png-52.png Is there anyway to do this with out identifying each individual image, adding it to … | |
I want to create a pdf file. And it has a long sentence that it won't fit in 1 line. Which method can I use to continue from the new line when the sentence to be added in the cell to continue from the new line. | |
I can't figure out how to display the ImageIcons after I get three random cards. I tried to add the .png to the random number and that didn't work. I would appreciate your help. import java.awt.GridLayout; import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JLabel; public class Exercise139 { public static void main(String[] … | |
Hi techies, Kindly help me the situation below: [CODE]//Interest.java /*Mr. Brown invests $50,000.00 in a savings account yielding 5 percent interest. * Assuming that all interest is left on deposit, write java codes to calculate and print * the amount of money in the account at the end of each … | |
Hello readers. I'm currently on my third year studying Computer Science course major in Software Development. I need some suggestions on a final year project that I can take up. I was wondering of what Java application that I can develop. Any suggestions? Anyone has any abandoned projects that I … | |
I am Making an implementation to the lz77 compression algorithm, but I couldn't calculate the offset, pleasei f someone can help tell me, [CODE] public class Main3 { public static void main(String[] args) { StringBuffer input = new StringBuffer("ADABRARRARRAD"); StringBuffer toBe = new StringBuffer(input); StringBuffer done = new StringBuffer(""); String … | |
| Hi, I would like to know if it's possible to edit specific rows from inside a textarea in a java swing application. So if I had a text area that held the following content: Row1 Row2 Row3 And I had a command like this: jTextArea1.getText().row[2].setText("New Row2"); Then I would want … |
I need help with how to handle parentheses when converting an infix equation to postfix through the use of a stack. The program reads the equations in from a .txt file. It works for the equations without parentheses, but not for those with parentheses. I've attached the text file to … | |
Hi, I want to write a java program that send a file through cable to another PC automatically in specefic time.. I don't know which cable to use(crossover or usb) and how to read and write from the serial port.. i tried to do it in VB(with help from some … | |
anyone have codes for bus reservation in java? | |
apart from using an oracle db, how else to manage a db using java?? | |
I need to know how to do the following: Allow for editing and Allow for searching by state or by any other options This is what I have so far: [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.border.*; public class AddressBook extends JFrame { // Specify the size of … | |
I'm needing to evaluate string infix equations and transform them to postfix equations. I'm following the info here: [url]http://scriptasylum.com/tutorials/infix_postfix/algorithms/infix-postfix/index.htm[/url] 1.) I'm confused by this line: "compare the precedence of the character with the element on top of the stack" It's asking me to compare the precedence of an operand to … | |
Hi... I'm a new user here. I've stumbled across this place on a couple occasions in the past, and it worked out to my advantage when I needed a little help with some coding assignments. My Data Structures class is working on stacks right now, and that is our current … | |
Hello Everyone, I'm having a bit of trouble seperating my user interface code in a main class from my logic code in another class. Basically i've put a while statement and some if statements in order to take input of a number from the user and decide which of two … | |
I'm writing a program that transfers files around a network using UDP. One of the things I am trying to do is break down files into small byte arrays that can be put on packets and transferred. But it doesn't work... It doesn't seem to be reading the bytes correctly, … | |
Hello all, I am developing chat application(not applet) in java, I want it to be able to run over internet I have tried it in LAN with Socket programming I found something [URL="http://javaeye.wordpress.com/2008/05/04/clientserver-communication-using-tcp-sockets/"]here[/URL] It is working fine But how can i run it over internet:?: :confused: If i [COLOR="Red"]tcpserver.java[/COLOR](or tcpserver.class) … | |
Hi all, I hope you are well. I am trying to compile a java file using terminal in Ubuntu, but I am getting the following error message: [QUOTE]1. ERROR in StringComparisons.java (at line 20) System.out.printf("String a = %s String b = %s \n", a,b); [/QUOTE] As you can see, I … | |
I'm writing a program that will download pfd files and collate them. However the urls I get are a bit weird. They look like this: [code]http://links.ealert.nature.com/ctt?kn=105&m=34136651&r=MjA1NzczMzM4NgS2&b=0&j=NTkwOTY5NjQS1&mt=1&rt=0 [/code] I'm using URLConnection and BufferedInputStream, but no data is read from the stream (read() returns -1 at the first try). If they are … | |
[CODE=java] how to merge two or more files (similar files) ex: two or mre pdf files, two or more xls files, two or more doc files. [/CODE] | |
hi,,,may u help me solving this problem in java code?\ a)f(x) = xcosx-sinx/x-sinx b)Use 4 important first numbers to gain f (0.1) please help immediately,,,,,thnx | |
Hi DaniWeb members:), I hope we could discuss about this matter and please do give advise, feedback or respond regarding my answer code below:icon_smile:. If the users enter x as 5, y as 6 the multiple table will be printed as below: 1*6=6 2*6=12 3*6=18 4*6=24 5*6=30 My answer code … | |
I have some classes that I use in most of my projects. [B]What [/B]and [B]how [/B]do I create something so the I can use them. A jar? An import? I'm using NetBeans as my IDE. Thanks for the help. | |
So here is the code for my program FileMatch and FileMatchTest. The purpose of this program to read file oldmast.txt which contains account numbers with first and last name and their balance. The program will also read trans.txt which contains transaction information. If the account number from trans.txt matches with … | |
How would one calculate the number of bytes of plaintext that could be encrypted as a single block given the key size? And how could you then calculate the number of bytes of cipher text that can be decrypted in a single block given the same key size because I … | |
I want to to do the following but can't figure out how to do it in Java. I retrieve information, including the primary key, from a database. Using this information, I load a comboBox. The user selects an item from the comboBox. Using that selection, I build an SQL join … | |
Hi, Here i draw chess boardgame ,but i want when i pressed by mouse on any square , blue rectangle appear .. I did this but when i pressed on any square the black and white coloe disappear and not only the square which i pressed has blue rect but … |
The End.