32,204 Topics

Member Avatar for
Member Avatar for Pyro197

ok, so i have a problem to do in java that i just can't seem to figure out. here is the problem: Write a Java program that prompts the user for how many individuals they will be entering. Then program will then prompts for each individuals name and account balance. …

Member Avatar for mozly
0
126
Member Avatar for beckveg

Hello everyone I want to run a .jar file, but the only way to run in my computer is with the "java -jar file.jar ", but the problem is that the application conects to a mysqldatabase, when I want to add something in the program appear a message that say …

0
118
Member Avatar for smith32

[CODE]File tempFile = new File(fw.getAbsolutePath() + ".tmp"); BufferedReader br = new BufferedReader(new FileReader(fw)); PrintWriter p = new PrintWriter(new FileWriter(tempFile)); String serData=(String)loadService().elementAt(i); StringTokenizer st = new StringTokenizer(serData, ":"); String code=st.nextToken(); String name=st.nextToken(); if (!name.trim().equals(deleteString)) { p.println(st); p.flush(); } p.close(); br.close(); if (!fw.delete()) { System.out.println("Could not delete file"); return; } //Rename the …

Member Avatar for smith32
0
427
Member Avatar for grady-lad

Hi I am doing a lab where I have to print out all of the locales when the JButton is pressed but when I run the program all it does is show the Vietnamese locale anyone any suggestions how to show them ALL ? [CODE] import java.awt.*; import javax.swing.*; import …

Member Avatar for moutanna
0
66
Member Avatar for Lulie

[B] I have this method:[/B] [code] static int countLeaves(BinaryNode node) { if (node == null) { return 0; } else if (node.left == null && node.right == null) { return 1; } return countLeaves(node.left) + countLeaves(node.right); } [/code] and i want to Write a client program that constructs a binary …

Member Avatar for Lulie
0
117
Member Avatar for bufospro

Hi, I want to make a game that I saw in internet but via applet code (and with move counter). The game is [URL="http://leepoint.net/notes-java/examples/games/slidepuzzle/slidepuzzle.html"]http://leepoint.net/notes-java/examples/games/slidepuzzle/slidepuzzle.html[/URL] Could someone help me please ???

Member Avatar for jwenting
0
134
Member Avatar for sonmagy

I want view web page by http connection in j2me but the output is html code if any one can help me please replay

Member Avatar for sonmagy
0
84
Member Avatar for trashbat

I'm trying to convert from some Java code, and I've got one massively complicated headache. Bear with me while I see if I can provide a comprehensible explanation. Let's suppose I have an abstract class called BaseDatatype. Other classes will inherit from this, e.g. StringDatatype, NumericDatatype and so on. Now, …

Member Avatar for Antenka
0
136
Member Avatar for BobbieJean

I've gotten this applet to do some of what it should but I'm having trouble getting it to do the rest. It's a multiplication applet that asks the user a question such as "What is 6 times 7?", has a JTextField for the user's answer, and a JButton to check …

Member Avatar for quuba
0
107
Member Avatar for Khodz

Hi Everybody, I'm currently doing a Computer Science IB course in which I'm required to create a java program of my choice. I'm quite new to java but i still chose something i thought would be cool and it turned out to be a little harder than i thought. As …

0
71
Member Avatar for thiyagu_mca2006

Hi All, Im Thiyagu, a junior software developer(Java/J2ee). I have assigned to access Webservice (sending request and receiving response from a WSDL). can any tell me the steps involved to convert Java code from a WSDL file using Axis(with ant build script). please very urgent. Note : I already tried …

Member Avatar for MudassarNazar
0
635
Member Avatar for lilpinay

this project is to determine if a phone number is a prime number. if the number is a prime number then print a message to the effect. if the number is not a prime number then print the prime factors of the number. allow the user to continue entering numbers …

Member Avatar for javaAddict
0
90
Member Avatar for the_preface

I'm writing a program that reads information from three seperate classes. Here is my code: [CODE] public class Animal { protected int id; protected String type; protected double mass; //------------------------------------------------------------------------ // Sets up an animal with the specified ID number, type and weight. //------------------------------------------------------------------------ public Animal (int animalID, String animalType, …

Member Avatar for javaAddict
0
165
Member Avatar for zigana91

I am working on an assignment where I am to create a mortgage calculator that allows the user to input there mortgage amount, term and interest rate. The following is what I have so far. The errors I keep coming up with are the following: The Decimal Format the for …

Member Avatar for javaAddict
0
154
Member Avatar for ShuiYinDeng

Sever.java file [CODE]import java.net.*; import java.io.*; import java.util.*; /** * Simple server use to teach University of * Northumbria's Operating Systems and Networks modules. * To be used with compatible simple client. * <PRE> * Protocol: * client <---message--- server * message = <message body> CRLF * </PRE> * * …

Member Avatar for moutanna
0
130
Member Avatar for BobbieJean

Hi, I'm having a hard time getting my applet to even build right. Here are the instructions my instructor gave: [I]"Develop a Java applet that will help an elementary school student learn multiplication. Use the Math.random method or a Random object to produce two positive one-digit integers. The program should …

Member Avatar for BobbieJean
0
419
Member Avatar for zreed

I need to do the following program, but it need to have a do while loop, scanner for input, and a console program. Here are the instructions: Write a Java program that prompts the user for how many individuals they will be entering. Then program will then prompts for each …

Member Avatar for Katana24
0
261
Member Avatar for AFB

java.awt.*; import javax.swing.*; import java.awt.event.*; class Getaction implements ActionListener{ String am = ""; String req ; String em = ""; String oper = ""; double x,y ,result; String res; Addcomp get = new Addcomp(); public void actionPerformed(ActionEvent ev){ req = ev.getActionCommand(); if((req.equals("1")) ||(req.equals("2"))||(req.equals("3"))||(req.equals("4"))||(req.equals("5")) ||(req.equals("7"))|| (req.equals("8"))||( req.equals("9")) ){ if (oper == …

Member Avatar for Katana24
0
138
Member Avatar for psomis

hallo guys.i am newbie at java and i want ur help. i have created the 5 five buttons but not the action listeners for them. the five buttons are : add person, see ll persons, search a person,update a person, delete person.so when i press add person the programm should …

Member Avatar for psomis
0
2K
Member Avatar for anoopasta

Hi All, I am working on Digitally Sign XML and managed to do it. The problem is that the code is automatically picking up one of the key and signing the XML with that. I want that user gets a drop down which has list of all the installed DSA …

Member Avatar for peter_budo
0
65
Member Avatar for BobbieJean

Hi, I'm having a hard time getting my applet to even build right. Here are the instructions my instructor gave: [I]"Develop a Java applet that will help an elementary school student learn multiplication. Use the Math.random method or a Random object to produce two positive one-digit integers. The program should …

0
74
Member Avatar for musikluver4

I have spent over a WEEK trying to figure out why my code isn't working. It's a long code, I will post it all but I will break down the code as I explain. First off, I have called double[] arrays and then initialized them later on in the program …

Member Avatar for musikluver4
0
3K
Member Avatar for Xeros606

I am making Tetris in Java. I have the Grid as its own class (extends JPanel) a menu bar (also extends JPanel) and a class for the main game window (extends JFrame). I created instances of the Grid and the menu bar inside the main game window class and added …

Member Avatar for javaAddict
0
82
Member Avatar for rena0514

my teacher wants the tictactoe game to have a button called play that resets the tictactoe game my button doesn't work....what did i do wrong? [CODE] //TicTacToePanel.java Author Carien Anderson //Represents tic tac toe game board and allows peer to peer competition import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.JOptionPane; …

Member Avatar for javaAddict
0
2K
Member Avatar for jman212

I have this 2d array that sorts the rows but i can't sort the column.. i can't figure it out for the life of me. PLEASE HELP Please enter size of row between 1 - 20: 5 Please enter size of column between 1 - 20: 5 Your matrix is …

Member Avatar for sneaker
0
143
Member Avatar for bi0201

Hi i'm a new student in java and would appreciate anyone helping me get through. I do not want you to do my work because that won't help me get through the next and next assignments however I would appreciate your help putting me on the right track such as …

Member Avatar for javaAddict
0
158
Member Avatar for whimsical1987

I am trying to implement a protocol that includes cryptography. What I am supposed to do is encrypt a combination of two public keys and a message. Although I have the message in String format I don’t have the public keys in string format. I am making use of getpublic …

0
66
Member Avatar for bi0201
Member Avatar for cdominguez13

I've been asked to create a Course class with the following attributes : Course code string course name string roster student[] count int I know how to set first 2 and the last one, but I am having problems with the aaray one. This is what i've done so far: …

Member Avatar for kvass
0
92
Member Avatar for luttinj

I am making a basic quiz show in Java and I have successfully made the first question. Now when I went ahead and made my second question I encountered this problem. When I run the program there are no errors with it, but it will not let me input a …

Member Avatar for moutanna
0
183

The End.