35,618 Topics
![]() | |
Hi, what does this code exactly do? implements other class to have the same methods, and then compares two objects of x with y and then returns it to back to the other class?? [CODE]import java.util.*; public class TableComparator implements Comparator<customerTable> { public int compare(customerTable x, customerTable y) { return … | |
Hello, i'm having trouble getting this program to work. It works when i just directly put in the file name, but when i try to use args and i pass it threw the command line. i can't get it to work. I've been testing stuff but i can't seem to … | |
| |
Basically I want my program to change the current price of an object with a new one, but I'm having trouble doing so. Here's my code: [CODE] //----------------------------------------------------------------- // Updates the product's price. //----------------------------------------------------------------- public void setPrice(double newPrice) { this.newPrice = newPrice; } [/CODE] [CODE] //----------------------------------------------------------------- // Changes the price … | |
Basically, I have a price quoter that I am working on. The way it should work is: The user selects the quantity of cards from the combo box. In the textfield a price displays once selected. (i.e. 100 = $8.95). (I have this segment working already.) Next the user selects … | |
so all i want to do is roll 1 die repeatedly and add it to a total until the total is equal to or greater than 31 this is what i have got to so far [CODE] import java.io.*; import java.util.*; public class comp { public static void main(String[] args) … | |
[code=Java]public class logout extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { process(request,response); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { process(request,response); } public void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); session.invalidate(); response.sendRedirect("index.jsp"); } }[/code] session is … | |
Hi, I'm supposed to write a program using super and subclasses to calculate monthly payroll for 5 employees. There are 4 types of employees, salaried, hourly, commissioned, and base plus commissioned. Anyway, I've gotten it to build with no errors and it runs almost like it should but since it … | |
[COLOR="Red"]Hello, I had put this question in another thread and I got a response that seemed to explain it well but I just seem to keep going in circles and I'm still just not getting it. So I need some more help. The other thread started getting pretty lengthy so … | |
Hey Gang; I'm new at this college thing, it's been a while. Need help trying to figure out why I am getting <identifier> errors. Here's my script. would sure appreciate any help you can give. Thanks ///////////////////////////////////////////////////////////////////////////////////// [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class TicTacToe extends Frame { … | |
currently writing a program, and for some reason I'm getting these two errors which are really bugging me. I've tried adding the brackets and changing the statement and still no luck. If there is a possible solution that would be grateful. [B]Please note that I have solved the bracket error, … ![]() | |
code for saving javascripts info in data base whats the procedure rishi waiting for ur reply<EMAIL SNIPPED> sql server 2005 database vb.net | |
Hello friend... i'm doing a j2me proj it is "banking application on mobile(using netbeans nd mysql database)" as my final yr proj... as i'm a fresher,i hv no clear idea about j2me.....my proj hv following specification. 1.login 2.balance enquiry 3.fund transfer 4.view mini transaction.. I'm able to login user successfully...bt … | |
I am having a problem with my program it has NO syntax errors but when I right click the class the "void main String [] args" option dosent appear so I cannot test my program I have no idea what it wrong PLEASE HELP [code]import java.awt.*; import java.awt.event.*; public class … | |
Like the title says I need help to display a doubly linked list in a forward order. No matter what I do, I can just get it to display in its regular reverse order. Here's the code: [CODE]public class DoubleLinkedList { private Node h; public DoubleLinkedList() { h = new … | |
As the title of the question states, my program is not able to store an integer from a seperate text file provided. For instance, instead of printing the desired output: "$45.00 17 2222 Chuck Taylor All Star" It prints: "$45.00 17 0 Chuck Taylor All Star" So even though I … | |
hi, I'm trying to insert values from a java page in to a mysql db the foll is the code [CODE] i1=st1.executeUpdate("insert into commissiondtls(CompanyCode,BranchCode,LineNo,PartnerCode,CustomerName,InvoiceNo,InvoiceDate,InvoiceAmount,ReceivedAmount,CommissionPer,CommissionPayable,PaymentRef,PaymentDate,InstrumentNo,InstrumentDate,BankName,BankBranch,CommissionPaid,Narration) values('"+CompanyCode+"','"+BranchCode+"','"+commissionDtlsmaxid+"','"+PartnerCode+"','"+CustomerName[i]+"','"+InvoiceNo[i]+"','"+InvoiceDate[i]+"','"+InvoiceAmount[i]+"','"+ReceivedAmount[i]+"','"+CommissionPer[i]+"','"+CommissionPayable[i]+"','"+Paymentno+"','"+Paymentdate+"','"+chequeOrDdNo+"','"+chequeDate+"','"+bankName+"','"+bankBranch+"','"+Amount+"','"+narration+"')throws SQLException"); [/CODE] this doesnot insert values or shows any exception,. what do u think might be the prob? pls help [CODE] public void CommissionDetailsSaveTransaction() { … | |
Hi All, I'm having issues with a for loop in .jsp. The second for loop in red will not post anything to the webpage. It will do work with variables. But when I try putting something like [B]<%=employeeIDArray[i]%>[/B] in the loop it does not work. Any help is appriciated. [CODE] … | |
![]() | In my previous post I asked the forum to help me make a race with an existing program I had made. I figured out a way to do this but now I got an error and I cannot solve it. If you need any additional information just ask ^_^ |
![]() | Hi I have an assignment to do where I have to make a race between two cars (this assignment is a continuation of a previos 'mini' assignment where I had to do the 'race' with one car). The commands that I implemented for the cars is foward (increases distance travelled), … ![]() |
i have two Jsp's pages. on main.jsp have some list of schools. from there i can go home page of any school. home.jsp represents a school home page. in home.jsp have some links like message, vision, addmission etc. when i click on any of these link then i get some … | |
Hello, all! I have a (hopefully) quick question: I have an array of 128 ASCII characters called blockData[] that I am trying to convert into a string. [code] for (int i = 0; i < 128; i++){ blockStuff = inFile.read(); blockData[i] = blockStuff; if (blockData[i] != 0){ String aChar = … | |
So, I want to work with a some media files and try to do some really cool stuff. The problem is that I don't have any Idea of where I should start, my experience with java hasn't dealt with video or audio so I'm a bit lost. Does anyone know … | |
i am new to Java and programming i just joined faculty of computer science and i am doing good but i think that all what i had until now isn't enough for my curiosity what should i do to master Java and become a Java expert and increase my programming … | |
ok so what i am trying to do is create a random int and save it into an arraylist and sum up the contents of the array list. then ask the user if they would like to roll again. any point in the right direction would be appreciated. so far … | |
public class MyDeque { private int maxsize; private int [] queArray; private int front; private int rear; private int nItems; public MyDeque (int s) { maxsize = s; queArray= new int[maxsize]; front=0; rear=-1; nItems=0; } public void insertRear(int j) { if (rear==maxsize-1) rear=-1; queArray[++rear]=j; nItems++; } public void inserFront (int … | |
Hi again............ I have got something new that........... i was using MS Access as the database with my JAVA Japplet.... In my applet i used JTextArea to display the output ..... The output to display is fetched from the database which is connected using DSNless connection as with connection string... … | |
Hi I've been told that for the next term i must do a programming project of my own choice. Any ideas on how I can impress? ![]() | |
Hello Everyone !! I read a program to create a simple moving banner from my book Java Complete Reference by Herbert Schildt, and after a few days I tried to make it myself from what I understood then.....but unfortunately mine doesnt work properly, even though I think I've done everything … |
The End.