- Strength to Increase Rep
- +3
- Strength to Decrease Rep
- -0
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 3
- Posts with Downvotes
- 1
- Downvoting Members
- 3
I am trying to write an elevator test program in java. It is suppose to execute the following steps using the methods in the class: 1: Starting from the first-floor. 2: Go to 2nd (update bool GoingUp) 3: Go to 3rd 4: Back to second floor This is what I … |
|
|
I'm trying to add the int values of Integer objects within an ArrayList, using a recursion (for the first time). Here's what I have so far: import java.util.Scanner; import java.util.ArrayList; public class SumArrayList { private static int calculateSumArrayListHelper(ArrayList<Integer> duplicate) { if (duplicate.size() == 0) { return 0; } int lastNum … |
Hi all I need to put a program on the server that frequently get data from the web and update the database with these data and this program should do this automatically. Can anyone put me on the Beginning of the road. I read in some websites about servlet context … |
|
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 … |
|
|
|
This is a very simple timer and I cant seem to get it to work I have tried this () runs but does nothing: [code] // The "Timer" class. import java.applet.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; public class Timer extends Applet implements ActionListener { // Place instance variables here … |
|
Im playing around with the clone method of arraylist and have a few questions. This is what i did with it: [CODE] ObjectMaker item1 = new ObjectMaker(); ObjectMaker item2 = new ObjectMaker(); ObjectMaker item3 = new ObjectMaker(); ArrayList<ObjectMaker> arrayList = new ArrayList<ObjectMaker>(); arrayList.add(item1); arrayList.add(item2); arrayList.add(item3); Object theList = arrayList.clone(); [/CODE] … |
|
I am using a Jtextpane in my application. I want to switch to line number I want . How can I implement Goto line feature in java for jTextpane. please help.... |
|
hey guys i got this new project for my java class and got the overall idea but my code still does not seem to work ...here are the directions: - make a 5X5 boolean array assign 5 random elements for 5 ships - user can have 15 guesses to find … |
|
This is basically to request help with my program, as was already evident. I am a student, and an assignment asks me to "Write a method that computes the spherical distance between two points on the surface of the earth, given their latitudes and longitudes." I have written this so … |
|
Hi, I'm having a problem with reading from the char , coupon, and it comes up with an error saying [CODE]Exception in thread "main" java.lang.NullPointerException at input.Main.main(Main.java:27)[/CODE] At the line which I read from the char, which is that myScan.findInLine bit, I am working from a beginning java programming book, … |
|
|
So my problem is that i'm trying to read a MyString that returns a new Mystring in which every digit -0123456789- has been replaced with a certain char. Ex: Blink182 ====>Blinkxxx [CODE]import java.io.*; import java.util.Scanner; //////////////////////////////////////////////////////////////////////////////// class Hw08 { //------------------------------------------------------------------------------ public static void main (String [] args) throws Exception { … |
Hey gus can one demontstrate to me a simple way of loading a picture into a panel using JFilechooser. |
|
Hello I have been trying to code this for the last few days, and i am unable to come across a solution for this. Would you please mind helping me out on this? There are some records in a notepad, which are as follows [CODE]1 Paul Mac 3 1 222 … |
|
Hi im working on this program im getting a runtime error that says this ArrayIndexoutofbounds exception 0. heres my code [code] import java.util.Scanner; public class MillerCalculateTime { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("Enter miles: "); double miles = sc.nextDouble(); System.out.print("Enter Miles per hour: "); … |
|
I'm trying to construct a rectangle & compute its area using the getWidth & getHeight methods.. but i cant figure out for to construct a freakin rectangle!! I keep getting the same error when i go to complie it.. no matter how hard i try :p "Cannot find symbol" [CODE]import … |
|
I could sure use some help. Here is what I have and it shows a problem which is : int tempCelcius = (int)((Double.parseDouble(tempTextField.getText())) (5 / 9) × (Fahrenheit – 32)); and here is all that I have: /** * * @author TJ */ public class FahrenheitConverterGUI extends javax.swing.JFrame { /** … |
|
|
so i'm created a program that display the name and grade of students from a file, and also a boolean that checks to see if the names are in alphabetical order. The problem is that i've created a files that has a name in alphabetical order but it still returns … |
[CODE]public void actionPerformed(ActionEvent ae) { if(ae.getSource()==clear) { tname.setText(""); tpass.setText(""); } else { if(ae.getSource()==Admin) { try { a=tname.getText(); b=tpass.getText(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:vote"); Statement st= con.createStatement(); ResultSet rs; rs=st.executeQuery("select * from votelogin where tname='"+a+"'and tpass='"+b+"'"); while(rs.next()) { aa=rs.getString(1); bb=rs.getString(2); } if(a.equals(aa)&& b.equals(bb)) { JOptionPane.showMessageDialog(this,"INVALID USER.TRY AGAIN"); System.out.println("invalid user"); } else { JOptionPane.showMessageDialog(this,"VALID … |
|
I need help with this hw problem. Generate a 2-D array of 25 integers and initialize them all to 0. Assign the value 9 to five random locations in the array to represent your mines. Fill the remaining array locations by counting the number of mines in any adjacent squares. … |
|
Ok, well I am now working on a new program where a program that counts the number of times a digit appears in a telephone number. And I have no idea how to even start this. Can anyone please help? Atleast try to give me a outline or something. Heres … |