35,618 Topics

Member Avatar for
Member Avatar for john2342

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 …

Member Avatar for vchandra
0
106
Member Avatar for Imberto

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 …

Member Avatar for Imberto
0
110
Member Avatar for Tinabaalan_IT
Member Avatar for jwenting
0
86
Member Avatar for the_preface

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 …

Member Avatar for BestJewSinceJC
0
131
Member Avatar for lwschjang

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 …

Member Avatar for moutanna
0
126
Member Avatar for pirateninja1111

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) …

Member Avatar for Sephladaj
0
115
Member Avatar for kjaved373
Member Avatar for samlabs821

[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 …

Member Avatar for lara.harsh
0
128
Member Avatar for BobbieJean

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 …

Member Avatar for kvass
0
2K
Member Avatar for BobbieJean

[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 …

Member Avatar for javaAddict
0
182
Member Avatar for Old Geezer

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 { …

Member Avatar for Old Geezer
0
118
Member Avatar for ku95

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, …

Member Avatar for Dukane
1
151
Member Avatar for palurishi

code for saving javascripts info in data base whats the procedure rishi waiting for ur reply<EMAIL SNIPPED> sql server 2005 database vb.net

Member Avatar for kvprajapati
0
44
Member Avatar for alok4u

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 …

Member Avatar for alok4u
0
81
Member Avatar for CSE Dunmond

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 …

Member Avatar for kvass
0
109
Member Avatar for NightOwls

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 …

Member Avatar for NightOwls
0
510
Member Avatar for the_preface

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 …

Member Avatar for vchandra
0
351
Member Avatar for beanboy

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() { …

Member Avatar for beanboy
0
192
Member Avatar for KurtDOg200

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] …

Member Avatar for javaAddict
0
71
Member Avatar for jeanfrg

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 ^_^

Member Avatar for white feather
0
102
Member Avatar for jeanfrg

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), …

Member Avatar for jeanfrg
1
2K
Member Avatar for vij123

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 …

Member Avatar for tyson.crouch
0
103
Member Avatar for JimD C++ Newb

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 = …

Member Avatar for JimD C++ Newb
0
132
Member Avatar for rue64ja

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 …

Member Avatar for moutanna
0
79
Member Avatar for mckrm

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 …

Member Avatar for Salem
0
125
Member Avatar for pirateninja1111

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 …

Member Avatar for pirateninja1111
0
114
Member Avatar for saggykulji

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 …

Member Avatar for white feather
0
174
Member Avatar for cool_jatish

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... …

0
79
Member Avatar for tygerberg

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?

Member Avatar for jeanfrg
0
137
Member Avatar for hypernova

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 …

0
98

The End.