32,204 Topics
| |
This isn't a problem, just a curious question. I'm using the password text field in my gui and basically, this: [CODE] String pin = new String(passwordField.getPassword()); Person p = new Person(); p.setPassword(Integer.parseInt(pin)); [/CODE] leads to a number format error, despite that I didn't enter a text. But this: [CODE] String … | |
I need help with this Java program for school. I have to add loops so that each loan will loop and show the payment made, the int payment made, and the loan balance for each month of the entire loan. There are three different loans, 7 year, 15 year, and … | |
Hi, let's say I have a program in my external hard drive and there's a code in my app that references a picture or a file in that hard drive, how do I make it so that when I take my external hard drive to another computer, even though the … | |
I have a project on sports Club Management. In that, I am providing add, delete, update and search facility. Add command is working simply by : `String qry="Insert into sport values('"+s1+"')"`; `smt.executeUpdate(qry);` This is just an example where I took only s1. But in delete, I wrote: String qry="Delete from … | |
hey im trying to make a program that if you use a scanner class you can type A and then the switch statment will change that to something else. altho i just realised that i cant do this as the way i would read a letter into a scanner would … | |
hey there guys, just starting to learn java and i'm having a little trouble putting code to paper. don't really want to ask the teacher because hes a perv but lets not get into that. okay, i am supposed to make a GUI for electronic voting ballot paper thingy and … | |
We all well familiar that Micosoft and Sun are best rivals Each one progressing in their own events through their products In such cases How Sun micro system given the rights to share the own product with Microsoft product Dot net for developing J#,etc in .Net professional products? | |
Hi all, Does anybody know what this "WSaction" is? What it does and most importantly how it works? I've tried googling this but hardly found ANYTHING.. I'm busy working with Servlets and as far as I can tell it checks what button was pressed in the HTML form.. But I'm … | |
I am not familiar with Java, but I have a question about a Java code which is supposed to find the first non-repeat element in an array. [CODE] Hashtable<Integer, Boolean> positions = new Hashtable<Integer,Boolean>(); int[] elements = {2, 2, 4, 5, 1, 6, 0, 9, 1, 4, 5, 10}; for(int … | |
// code to read the fasta file import java.io.*; import java.util.*; import org.biojava.bio.*; import org.biojava.bio.seq.db.*; import org.biojava.bio.seq.io.*; import org.biojava.bio.symbol.*; import org.biojavax.bio.seq.RichSequenceIterator; import org.biojavax.bio.seq.io.FastaHeader; import static org.biojavax.bio.seq.RichSequence.IOTools; public class ReadFasta { /** * The program takes two args: the first is the file name of the Fasta file. * The second … | |
helo i am a begineer in java field..and i have to know about image processing so plz help me to get start with java in image processing. | |
okay, what i am trying to do is to build a chess game. now i am at the begining of the code and i got stuck. i created 6 packages for each piece and one package for the chessboard. now the idea is to create a new array each time … | |
Hi Guys I wonder if you can help me with this I have built an application that reads my forum and grades responses and things and adds them to a database,. When the application is searching my forum the gui is hanging until the search is complete. The front page … | |
public static double average( double... numbers ) { double total = 0.0; [B][I][COLOR="Red"]for (double d : numbers)[/[/COLOR]I][/B] { total += d; } return total / numbers.length; } can any one explain the line bold if posseble d program too... | |
I am working with a springs application and every time i generate a report i need to hard code the report structure and the table attributes everytime.. I am thinking of an idea in which i can create an automated tool attached to my application so that at runtime if … | |
With the help of ibatis we can perform insertion and many other sql operation with direct queries. I have an update query. On the updation on table. a trigger fires which insert a row in another table. Query is written in ibatis and trigger on database. i want to remove … | |
Hi Daniweb. I've been working on a project for quite a while, and posted many problems that I encountered on Daniweb. Thank you to all the users who helped me. Every single one of those problems where solved in less than 24 hours after posting on here. My project mostly … | |
Reverse words in the sentence without using any Java API or new array Eg. Input => 'this is the wonderfull island' Output => 'island wonderfull the is this' If any logic, pls let me know -- thanks, ramjeev | |
I am having problems with the following code. Here is my assignment for this week, Write the program in Java (with a GUI) and have it calculate and display the mortgage payment amount from user input of the amount of the mortgage, the term of the mortgage, and the interest … | |
Hi, I was wonder if someone could give me some help with my program I have a variable: "playing football" and i want to split that into chars like so, 'playing', 'football' can you help me??? | |
Is there a way to add a user to a group in J2EE dynamically (using glassfish btw)? If so, is there a away to have a user in a group called members to be promoted to an admin group. Thanks in advance | |
I've been learning Java here and there for the past few years from high school classes, but I don't know if I have enough knowledge of programming to actually make something useful. What do you think someone should know to be considered a beginning programmer? I'm just trying to gauge … | |
Hi, this is a very strange problem for me. I'm writing an app that uses the BouncyCastle API. I downloaded the jar file from their website and I put it in my project build path so as to use it, and it works. However, when I try to run the … | |
readLine() returns string type.... i have a file of usernames and passwords and am trying to check the username as when entered into login page..... [code=java] InputStreamReader i1=new InputStreamReader(new FileInputStream("usr")); BufferedReader b=new BufferedReader(i1); String str; str=b.readLine(); for(int i=0;i<str.length;i++) if(str[i]==("USERNAME: "+Login.usr)) { bool=true; } [/code] now i know im trying to … | |
I need to write an Array List of Pets. An item list is either a Dog or a Cat. For each pet enter a name and type (C for cat or D for dog). Input should stop when the word STOP is entered for the name. I need to also … | |
Here's the prompt guys: Assignment #4 will be the construction of 2 new classes and a driver program (the class containing a main method). [B]Address class[/B] The Address class describes cpu of a bank. It has following attributes: Attribute name Attribute type Description city String the city of the bank … | |
can anyone explain to me about what actually is a constructor? | |
I have downloaded stanford parser package from web because I want to use it in my java program. I don't know that in which subfolder of jdk 1.5.0_22 should I extract the .rar files of stanford parser. Can any one tell me. I'll be thankful. | |
i wanna ask another thing i have created an applet which has one main file and 7 other class files now i want to connect it to database the following code is in class file on compiling it gives access control exception... [code]private boolean spellCheck(String spell) { Connection Conn; Statement … | |
hello. i have done the followinh program to convert a String value to a double value.when i am compiling this program, i get an error as"unclosed character literal in the 18th line.can anyone say what's the problem? import java.io.*; class strin { public static String a(String s); { String j=""; … |
The End.