32,204 Topics
| |
I have a problem with my program. When i try to compile it it says i need a ; can someone try to compile it and please help me? [CODE]//This program will represent a pizza public class Pizza { private double cost; //the cost of the pizze private String crust; … | |
Hi everybody. I am writing a program that calculates the amount of Carbon Dioxide produced in a year from waste by a few selected households and comparing how recycling can reduce the CO2 footprint. However, I believe the code is correct; I am just not getting the expected output. So, … | |
Hi Guys! I am trying to get a scroll bar to go to the lowest position possible. I am using a chat program and it bothers me that I have to scroll down to see new messages! I googled around and found lots of answers for flash, and other languages … | |
HI all wonder if someone can help, i want to be able to printout specific elements within an arrayList without using array keys. I have the following code, which will print out every element in the array. I want to print out every 2nd element. So so i had a … | |
Name: The name of this file is table_autoincrementedId Hello and Thank you in advance for any assistance. Purpose: The project is a Visual web JavaServerFaces project that is in the same folder and that imports the app library. Modeled after the tutorial at Using Java Persistence API Within a Visual … | |
I have the following as my code, and i cant figure out why i am getting this error. I think it has to do with my While statement. Please help! [code] import javax.swing.*; import java.lang.String; public class FollowingDate { public static void main(String[] args) { String date, month, day, year; … | |
hi ive developed an inventory program but when i compile it keeps giving me an error message that ive tried solving but it doesnt work.the code looks like this: // Inventory.java // Program that displays the value of a product in inventory. import java.util.Scanner; // program uses class Scanner class … | |
I am reposting this question. How many bytes in memory a string occupy in Java language? Suppose i write: String name="Bill Gates"; So, how much memory it requires? Whether it can store a UNICODE character in the string. How internally it is implemented, using a 1 byte char array or … | |
Okay I have a finished program that does the job of what I want to to do but it seems so messy. Could you guys gimme some suggestions about how to make this code more efficient... or just neater in general. Much appreciated and thanks in advance. [CODE] import java.awt.*; … | |
Hi Frnds, I am making one application in java which queries with the printer using snmp protocol , I am throwing Object IDs and getting the result back from printer , i ma using java snmp package , but when i throw one oid 1.3.6.1.4.1.11.2.3.9.4.2.1.1.2.65.1.1.0 , i am getting the … | |
hi! First of all sorry if my english is a little poor I want evaluate a text box named txt1, the focus shouldn't exit from the text box until the user write any in it. This is my code: [code=java] txt1.addFocusListener(new FocusListener() { public void focusLost(FocusEvent e) { if (((Text) … | |
Hi, learning swing at the moment and was following a tutorial off the sun website, made mine with eclipse instead of netbeans. but all I get when I try to run it is the following in the Console window: gap= 4 gap= 0 Not sure what is going on here. … | |
Hi, My Signed Applet works fine on my XP and Vista. I just accept the certificate as Trusted and it is fine. Signed Appplet and Certificate are made on XP. I want to run my signed applet in a remote Mac and Linux PC. When I open the page, it … | |
I'm not sure what forum this fits into, if any, but the program itself is going to be written in Java (not that it matters much). My question is, what is the easiest software to use that I can create a drawing of a GUI with? The GUI I want … | |
Hey everyone. rather new to java and was wondering on how i would accomplish this. I am using the Netbeans JDE in creating a Java GUI. I have completed the whole script but now am just doing some fine tuning in flattening out any errors that could go wrong with … | |
I have error in the top of this program not sure what I did wrong. import javax.swing.JOptionPane; public class Main_Class { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub class wk2 { private static final char Y = 0; /** * @param … | |
I am doing a chess game using arrays in java I have my array set up I just need to figure out how to write an algorithom that goes over the chess board and reports what is on what spot --(i,j) coordinate. Here is my array. Also let me know … | |
Hi all wonder if someone could give me a bit of help, i'm new to using RnadomAccessFiles, so please bear with me. Basically i have the method below, which writes some data into a xml file, what i want to be able to do, is move the file pointer to … | |
Hi, In one of my task i need to strip off zero from a string. In the following variable declaration : var i = A010; (Alphanumeric format type which has 10 spaces) i need to strip off zero between A and 1. i should not remove the zero which comes … | |
I need a simple of way of redirecting output from the console to a custom GUI that I have made i.e. Text Area or Text Box. Am looking for a way of making the PrinStream to be attached to my custom gui so as to output the contents of System.out … | |
[QUOTE]Hello Everyone, [/QUOTE] I would like to ask some help from you. I'm Mark from the Philippines. I'm a newbie programmer and I'm new with java,that's why it's very difficult for me to make a program using java. Our Teacher had given us an assignment using java,to make a simple … | |
hi,pls wat does this symbol mean(%)?i know it means remainder,but can not seem to understand in what context . for example if you say hours = hours%24; minutes = mins%60;................. | |
Hi, How to get the value from a hashtable irrespective of its case... plz reply ASAP. Thanks in advance, Shilpa | |
Hi. Just wondering if there's a shortcut to this code? [code] if (calculation(codeword, s[0]) == calculation(codeword, s[1]) || calculation(codeword, s[0]) == calculation(codeword, s[2]) || calculation(codeword, s[0]) == calculation(codeword, s[3]) || calculation(codeword, s[1]) == calculation(codeword, s[2]) || calculation(codeword, s[1]) == calculation(codeword, s[3]) || calculation(codeword, s[2]) == calculation(codeword, s[3])) [/code] Thanks in … | |
Hello Fellas, I would like to ask some help from you. I'm Mark from the Philippines. I'm a newbie programmer and I'm new with java,that's why it's very difficult for me to make a program using java. Our Teacher had given us an assignment using java,to make a simple chat … | |
hi i need help with writing a program...I have to Write a program that simulates a student registration. A button allows entering a student name. Three more buttons are used to enter test scores. Name and test scores are entered into a text field. The information about the student, including … | |
Guys We have a project.. . Its' a sales and inventory system.. . My question is can PHP and Java plus MySQL.. Work together.. PHP obviously runs in a web browser. But I wanted also the java program to run also in the web browser, can I also run the … | |
In the writing of this program, I have happened upon a problem in the main method of the Tester class. In the Tester class, I am trying to print out the average monthly electric bill value. However, when I try to run it, I get an error stating: "calcAveragePrice(java.util.ArrayList<java.lang.Double>in CO2FromElectricitycannot … | |
I'm trying to put together code that can upload multiple files to a server via HTTP. So far, I've put together code that can send one file at at time via HTTP. When I send more than one file at a time the first file is processed but then the … | |
Hi. Sorry, if this is a really easy to answer. I need to find the smallest int result in a calculation between a fixed value and a variable. Then I need to return one of those variable. However, if there exists multiple smallest results, then I return a fixed value. … |
The End.