35,618 Topics

Member Avatar for
Member Avatar for need

I need to sort the students in array in ascending order of first name. I tried to do arraylist but it didn't work. Can someone please help me with this? Student.java [code] public class Student { private String firstName; private String lastName; private String studentNumber; Student(String fName,String lName,String sNumber) { …

Member Avatar for AbhikGhosh
0
155
Member Avatar for mayu

Hello, i have one problem in retrieving updated data from textbox which in in iterate tag. this code is in jsp page which is part of table: [CODE] <logic:present name="effortForm" property="activity" > <bean:size id="size" name="effortForm" property="activity" /> <logic:greaterThan name="size" value="0"> <logic:iterate id="result" name="effortForm" property="activity"> <tr> <td align="left"> &nbsp; <bean:write name="result" …

0
64
Member Avatar for motress

00:24:c3:31:2b:e0 -93 00:12:17:7b:33:04 -80 00:1f:27:55:f7:70 -70 00:1e:13:ee:3e:40 -85 00:24:c3:31:b8:80 -91 00:90:4c:60:04:02 -94 00:1b:0d:d6:6d:50 -70 00:1a:a2:dc:a0:60 -86 00:1e:c1:4c:c5:ce -94 00:24:c3:31:b8:80 -91 00:1e:c1:4c:c5:ce -94 00:1a:a2:dc:a0:60 -91 The above is part of my .txt file, is there any method to calculate the average value for each ID ? The first part is ID, …

0
42
Member Avatar for ctsarsh

i need to convert this java code to java applet code here in my java code: [CODE]import java.io.*; import java.util.*; public class fyp { static int t_value=2; static int no_of_parameter = 0; String binary_setting; static int data[]; static ArrayList<String> constraint = new ArrayList<String>(); static ArrayList<String> seeding = new ArrayList<String>(); static …

0
55
Member Avatar for XodoX

Hello, I got an car inventory program that stores the names of cars etc. I thin a class arraylist would work better. Like an array that can "grow" and "shrink". But I do not know how to convert the code from array to arraylist. It should still keep the member …

Member Avatar for BestJewSinceJC
0
114
Member Avatar for Dizzzy

Is there a way to setup a jFormatted Field and retrieve a int value using getValue()... I am abit lost. [CODE] private jFormattedField CsNumber = new JFormattedField(); [/CODE] Also is there a way of restricting the value being input to only being a number and not negative?

Member Avatar for gangsta1903
0
117
Member Avatar for dhana.519

Hello: i am try to run xml parsing example in j2me with Netbeans 6.8 for cldc but when i compile it gives following Error: error preverifying clas bin.EventList Class loading error: Wrong name i am using kxml2 jar file for importing org.kxmlparser. can any tell what is this error . …

0
61
Member Avatar for zup7778

I am getting the error, cannot find symbol- Constructor employee (blahblahblah) heres the employee class it compiles fine.... public class Employee extends Person { private double salary; private int emplId; private String emplType; private String emplTypeDescr; private String firstName; private String lastName; public Employee(String firstName, String lastName, double salary, int …

Member Avatar for Ezzaral
0
136
Member Avatar for maverick_ymca

Hi, Thanks for such valuable inputs all you guys contribute here. This is my second request for assistance here, I'd appreciate any assistance. I developed an application which queries a webservice to get back data in form of XML. The webservice has a restriction on its usage in daytime, that …

0
88
Member Avatar for emanicom

I just want to know If I can combine the 2 codes together, that I created, or do I have to start over? The new assignment is to: Use an array for the different loans. Display the mortgage payment amount for each loan. Then, list the loan balance and interest …

Member Avatar for emanicom
0
151
Member Avatar for need

I have two classes. Student and StudentTest. My test class wil read the student info from the command line. I also need to check if the student already exists with equals() method. Can someone help me with this? Student [code] public class Student { private String firstName; private String lastName; …

Member Avatar for Ezzaral
0
173
Member Avatar for emanicom

/* PRG/420 Week 3 Assignment: Mortgage Calculator Program Programmer: Eva Manicom Date: March 1, 2010 Filename: Mortgage Calculator Program Purpose: Modify the mortgage program to display the mortgage payment amount. Then, list the loan balance and interest paid for each payment over the term of the loan. The list would …

Member Avatar for emanicom
0
144
Member Avatar for emanicom

The top code is my Loop for the mortgage program. The second code is my Array list for the Mortgage program. Is there a way to combine the 2 to do the following:* Use an array for the different loans. Display the mortgage payment amount for each loan. Then, list …

Member Avatar for emanicom
0
184
Member Avatar for msr

Hello, I would like to declare a class atribute so I wrote something like this: [CODE] class Xpto{ private static int value; }[/CODE] However, once is private, I cant access it like Xpto.value nor a.value ("a" is a Xpto instance) Declaring it protected I can access it through class and …

Member Avatar for BestJewSinceJC
0
75
Member Avatar for shawnfrancis

I am going to come right out front and say I am in computer science class and we are working on java code and I am needing help. I keep getting an error message that reads: ComputeChange.java:4: class, interface , or enum expected java.swing I understand that it is telling …

Member Avatar for stultuske
0
166
Member Avatar for Aisha25

(Science: wind- chill temperature) How cold is it outside? The temperature alone in not enough to provide an answer. Other factors including wind speed, relative humidity, and sunshine play important roles in determining coldness outside. In 2001, the National Weather Service (NWS) implemented the new wind chill temperature to measure …

Member Avatar for BestJewSinceJC
0
991
Member Avatar for pocix

hi everyone i need help how to -creates an array for 5 integers and store it in array -use the highest & lowest integer and cube it i stuck in array, i confuse how to input integers to array with JOptionPane so far for the input [CODE] import javax.swing.*; import …

Member Avatar for pocix
0
118
Member Avatar for celyst

I am having an issue with creating some JSP pages. I have a few pages (Home, About Us, Contact Us) done up in JSP, and I also have the ability to login to this site using a username and password. What I want to achieve is to allow visitors to …

Member Avatar for celyst
0
535
Member Avatar for agarwalsrushti

Hi All, I want escalations mails to be sent to higher authorities after the specified duration has been exceeded. Eg: If a client has a task to be performed in 2 hours and if it is with him for more than that then a escalation mail should be sent to …

0
39
Member Avatar for hawglinx

I am in my first java class and I am writing an amortization program. I have gotten every thing to work correctly thus far except when I try to put in an outer loop I get the following error: 1 error found: \gnixon00Lab3Test.java:116: cannot find symbol symbol : variable restart …

Member Avatar for hawglinx
0
473
Member Avatar for handrews3583

I am very new to programming and am really struggling with Java. I'm currently working on the below code, but when I compile the program, I'm getting several messages referring to multiple lines in my code, all stating things like the following: C:\Users\Heather\Documents\HACH5_8.java:111: cannot find symbol symbol : variable showFeet …

Member Avatar for handrews3583
0
214
Member Avatar for sirishag.ch

Hi, I want to check whether a system exists in LAN or not and also the database residing in that system is up or not.So, for this I'm trying to use telnet command as follows, Runtime rt=Runtime.getRuntime(); Process p=rt.exec("telnet 192.168.1.15"); No error nothing ,It is executing .But by using the …

Member Avatar for Rushikesh27
0
2K
Member Avatar for lindanilou

hi does anyone has the java code for quassian quadrature rule in java please? this is a method for numerical mathematics. i need to write a code in java for this i understand the mathematics behind it very well but unfortunatly i dont know how to write it in java. …

Member Avatar for bibiki
0
85
Member Avatar for Xessa

I am sending an array which consists of objects that i have created. And my class consists of a String value and a HashMap How can i get these values? $F{myObject}.get(1) Can the code i wrote above work?

0
61
Member Avatar for Robot1199

i am new to java programming and not good enough. we are required to make one class which creates and manages connection to database instead of all my servlet. i cud come up wtih the following code. please assist in what i have done wrong .thanks My connection file. [CODE]/** …

Member Avatar for javaAddict
0
120
Member Avatar for PhiberOptik

Hey guys, I have two JPanels for my game, one jpanel shows my character, informational text and the other shows the map which is made up of a tileset. Is there anyway I can show the map behind the character and information without merging the two java files? the Map …

Member Avatar for cale.macdonald
0
851
Member Avatar for SchoolBoy

I am writing a program for school where the user inputs their age into a String which is then converted to an integer. When a value that cannot be converted to an int is input, an exception is thrown. I have written the code for this, but I am not …

Member Avatar for SchoolBoy
0
83
Member Avatar for smokin745

Ok i have a mthod that writes data to a file and throws an exception [CODE] import java.io.*; public void writeBook()throws IOException { String filename = JOptionPane.showInputDialog("Please enter a file name to add the book details in."); FileWriter outputFile = new FileWriter(filename); BufferedWriter outputBuffer = new BufferedWriter(outputFile); PrintWriter printStream = …

Member Avatar for masijade
0
85
Member Avatar for Egypt Pharaoh

why when increase floating number with floating number catch error as [CODE] for(double i=0; i<10;i+=0.1) System.out.println(i); [/CODE] the out put is 0.0 0.1 0.2 0.300004 ....ect but the logicaly output is 0.1 0.2 0.3 ....ect

Member Avatar for kvass
0
113
Member Avatar for AlcatrazLogan

Hi, I'm developing a web service that will be running alongside a server. They'll be sharing similar classes and data and I was wondering if there would be a way to launch a JFrame for the server when the web service is deployed?

0
76

The End.