32,199 Topics

Member Avatar for
Member Avatar for raul8
Member Avatar for pcvrx660

The assignment I am doing is almost complete but the while loop doesn't exit. package lessons; import java.util.Scanner; public class Chp4417 { public void determineMileage() { Scanner input = new Scanner(System.in); int miles, gallons; //read in the inputs. int counter = 0; // counter int totalGallons = 0; //calculate total …

Member Avatar for Buffalo101
0
146
Member Avatar for javanoob21

Ok, I'm very bad at java and I was wondering if anyone could explain to me how I would begin to approach this? This problem involves a system which processes medical insurance forms. The forms have a three byte code which starts with a first character alpha code of a …

Member Avatar for JamesCherrill
0
124
Member Avatar for aman rathi

i am very beginner to java getting error in below code [CODE]class forloop{ public static void main(string args[]){ int x; for(x=0;x<10;x=x+1) system.out.println("this is x:"+x); } }[/CODE] error : cannot read :forloop.java i error please help me

Member Avatar for aman rathi
0
176
Member Avatar for sfrider0

Is it possible to display a web page inside of a java applet? It would work similar to a frame using html. I guess it would be like a mini web browser inside of a web browser.

0
82
Member Avatar for montalbano80

I am having some trouble with my Java program. I completed a PoolVolume class project and am trying to add a login and password page before the PoolVolume class starts. I completed the login and password script but can not get the login page to access the next class page. …

Member Avatar for montalbano80
0
190
Member Avatar for TheOnlyNemesis

I have got further into my program and am at the last hurdle, i am using String.split to split InetAddress IP using getInetAddress. so IP is storing the host name and ip address which is split by a /. I am trying to split the string using string.split but when …

Member Avatar for ztini
0
139
Member Avatar for musikluver4

How do you allow an action to be performed when a user selects a specific item on a Choice() component? For example: If a user selects a specific item on the Choice() component, I want a JTextField() to be set to .setVisible(true) and appear. Anyone?

Member Avatar for musikluver4
0
82
Member Avatar for Neversleepin

Hi, i'm trying to copy and paste 12 last modified files from a folder to another one. my code is working but it gets every files in the folder with any dates. any help will be appreciated. Thank you very much [CODE]import java.io.*; import java.text.*; import java.util.*; class FileFilterDateIntervalUtils implements …

Member Avatar for Neversleepin
0
245
Member Avatar for addlou

Write a method called newTest(String input) that accepts one input. Input is a string stored as a variable called input and returns nothing back. Method should test to see if the string’s first and last characters are the same and should disregard case. Use a string method that converts to …

Member Avatar for mKorbel
0
160
Member Avatar for spencer.kindt

I'm in a beginner Java class at school and I'm having a hard time getting this to work. Most of our problems require JOptionPane and for or while loops and if statements and those kinds of things... For #6, I'm thinking about using a while loop and a for loop …

Member Avatar for spencer.kindt
0
178
Member Avatar for oliminator123

Hi, new here but would appreciate some sort of help. I have to create a program that takes 20 random strings from a string array of 40 words I made, and store them into a new string array called second. Directions: -create random # generator -generate random # between 0 …

Member Avatar for oliminator123
0
812
Member Avatar for priyamehta

Hello, I am new to programming and I have to write a program to perform a fast search on address book. The address book records are in csv file and contains 4 fields - first name, last name, phone number and company name. My problems are - 1. How do …

Member Avatar for priyamehta
0
322
Member Avatar for kukuruku

Hi everybody,I have java exam tomorrow and one of the question is going to be tracing code,unfortunately I am not vary good at that.My question is if anybody knows web site on the net with similar questions and answers Thanks yesterday the professor give us this example [CODE]public class A …

0
57
Member Avatar for addlou

I need help showing me where I went wrong. Given problem is. Print to System.out a new string composed of every alternate character in sentence starting with the first. Use a loop to go through a string and retrieve characters from alternate index positions. Append these characters to another string …

Member Avatar for addlou
0
4K
Member Avatar for -acir-

[ICODE] here's my code below and i cant seem to find out how to return to public static void main after selecting yes in the dialog box. this cud be a very damn question however i get confuse about how to resolve this. thanks. by the way, this program is …

Member Avatar for -acir-
0
881
Member Avatar for villalandron

Hello! I am trying to finish this Recursive multiplication program and I am stuck. What I need to do is write a recursive function that accepts two arguments into the parameters x and y. The function should return the value of x times y. I used this program from the …

Member Avatar for jon.kiparsky
0
181
Member Avatar for TheOnlyNemesis

Hey, i am struggling with this program, i have tried everything i can think of but it still says missing return statement on public String processInput(String theInput){ [CODE]package clientserverassignment; import java.net.*; import java.io.*; public class Protocol1 { private static final int WAITING = 0; private static final int SENTTOS = …

Member Avatar for jon.kiparsky
0
211
Member Avatar for sandman89
Member Avatar for kirankumargali

ITU wants you write some classes for their Personnel Record System. To make it simple, consider only 4 classes: Person, Employee, Instructor and Student. The following figure illustrates the relationship between these 4 classes. The Person class is the parent class of the Employee class and the Student class. The …

Member Avatar for javaAddict
-4
535
Member Avatar for Progr4mmer

when ever i try to compile/run my game in eclipse it says this [QUOTE]Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at OurGame.Board.checkCollisions(Board.java:78) at OurGame.Board.actionPerformed(Board.java:40) at javax.swing.Timer.fireActionPerformed(Unknown Source) at javax.swing.Timer$DoPostEvent.run(Unknown Source) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at …

Member Avatar for Progr4mmer
0
103
Member Avatar for Neversleepin

Hi, i'm still beginner in java. Here is my simple question: if we have two java programs like: -test1.java which open a file for example. test2.java which move one file to another directory. Suppose these two programs are working well separately. if one day, we want to write just one …

Member Avatar for Neversleepin
0
159
Member Avatar for kellyslater36

Hi Enclosed is my Java assignment which is due **Tuesday**, any help would be greatly appreciated. Program Specification: (1) Rather than having the trainee type in the full title of his Training Module, let him choose from a menu: the choices should be: “Forward Scanning Radar Display Repair”, “IR Beacon …

Member Avatar for kellyslater36
0
167
Member Avatar for sj5536

hi i created text to pdf converter project in java using eclipse. when i run it from eclipse it works properly. in eclipse i used export menu to create executable jar file(runnable jar).when i run project from that jar file it actually run but it wont convert those text file …

Member Avatar for JamesCherrill
0
180
Member Avatar for infinitus

I dont know how to kill this JOptionPane pop out eveytime i do something... it just pops [CODE]Object[] options = {"Option 1", "Option 2"}; Component frame = null; int n = JOptionPane.showOptionDialog(frame, "Chose Game Option \n *Option 1 - Enter Secret Word\n *Option 2 - Random word selection from secret …

Member Avatar for infinitus
0
162
Member Avatar for coco24

Hi, I am trying to compare two objects, but it is not working correctly. Please help. [CODE]/** * Compares theObject with <CODE>this</CODE> object for * equivalence. Do not concern yourself with runtime * efficiency. * @param theObject to be compared with this object * @return true if theObject is equivalent …

Member Avatar for anon12
0
79
Member Avatar for gavriela

Hello, I'm a student working on my first hands-on assignment. One of the questions is this: Q4: Write a program that converts a user input temperature from degree Celsius to Fahrenheit or Fahrenheit to Celsius using: C = 5 (F -32)/9 or F = 9C/5 + 32 The user must …

Member Avatar for ~s.o.s~
0
411
Member Avatar for 3vilwyatt

So I am a bit confused with the following terms already and how they interact. I am new to IM creation and I want to know the best approach on how to go about this. Anybody can explain them to me? I know ejabberd is a kind of open source …

Member Avatar for 3vilwyatt
0
115
Member Avatar for Mabyboi

Hey guys, Im having a really hard time with this, I've been searching and trying to work at this for hours but cant get anything to work. If you guys could help it would be amazing. Essentially what I need to do is take this code thats been provided to …

0
56
Member Avatar for jrosh

I wrote a web service to connect to mysql database. But I can't find a way to call it from the j2me midlet to pass parameters to the web service. Please help me with this.

Member Avatar for jrosh
0
89

The End.