32,204 Topics
| |
I'm dying here. I can't find out why my code isn't working. I get "illegal start of expression" in Blue J. It's on line 34 ( if((menuchoice = = 0) && (gender.equals("M"))) ) [ICODE]/** * Brandon * November 14, 2007 * TDEE */ import java.util.Scanner; public class TDEE { public … | |
Hi I am creating a vending machine application that takes coins. It takes 5p, 10p 20p 50p £1 and £2 coins. Now I need to keep track of all the coins when inserted e.g. if I insert 2 pounds in 5p coins. When I chose to refund the money I … | |
so, everything works through the first iteration (don't know if this is an appropriate term for linked lists, but we just learned arrays) but then it stops. I thought that telling it to continue until position.next != null and increasing the position after every iteration would work but I think … | |
Hey! I am new to java programing and need some help with some homework, here are the requirements: Right now I am working on just setting up my arrays but it is not working. I read the size of the array from the user and then tell the user to … | |
Hi da, Suggest me good books for Swing and JDBC(apart from Sun tutorials -which I will use) . I have basic knowledge of Swing which I read from Head First Java but I don't know anything about JDBC. Now I want to explore my knowledge in Swing and I'm going … | |
I have a Java HashMap with String keys and Integer values. I need to produce a string which has the keys in the same order as their corresponding values sorted by numerically descending order. What are my options? | |
I have a question regarding the test condition of the [I]for[/I] loop.. For example, if the loop is say: [CODE]for ( int i=0 ; ( C1 && C2 ) ; i++ ) {// some code}[/CODE] My question is, if either C1 or C2 is false then the test condition is … | |
i am using tomcat 5.0.28 in windows. i tested some html ,servlet, jsp in it and it executed properly. but when i used a servlet which required database connectivity it is generating error. i am using sql server 2005 as my database. plz. tell me how can i configure my … | |
Hi All, I have a new assignment which I have worked most of the way out, except I have one issue. When I sort the large text file it does not print out all the information at that moment, I have to hit enter a couple of times before all … | |
I'm supposed to be taking all the averages of the students grades and create an overall average...but it's not working import java.io.*; import java.util.*; public class Grade { public static void main(String[] args) throws IOException { String []name = new String[50]; int num1, num2, num3; Scanner inFile = new Scanner(new … | |
I'm trying to practice writing a program which creates an object and does various tasks. So far the tasks I want to program to do are to take a hypothetical triangle (it doesn't draw a literal triangle on the screen; it just shows the number of triangles there, the area … | |
ok, i have created a balloon shape but i dont know how to implement it onto a canvas or to even create one.i have honestly tryed everything and put alot of effort in before i ask for any help, but i have come to the end of my teather. | |
the below program is supposed to read the string you input and count the amount of times that the letter 'a' appears in it. if it doesn't find the letter 'a', it's supposed to tell you that there aren't enough arguments (which i may change to say that "there aren't … | |
I'm working on a program for school and the code I have so far is: [code] public class Assign6{ public static void main(String[] args){ int bill = (int) (Double.parseDouble(args[0])*100); Change aSmall = new Change(bill); System.out.println("# of Fives: " + aSmall.numOfCoins(500) ); System.out.println("# of Ones: " + aSmall.numOfCoins(100) ); System.out.println("# of … | |
I face the problems of don't know how to convert the number from any base to any base.I just can get the output by converting the number from base 10 to any base.So,panic.:( :'( Who can help me,thanks. | |
Can anyone help, I am trying to access my place of work from home without much success. I can log in, it then says: 'Welcome to the Radian Citrix Portal, please note that to use this service you must install either the Citrix Web Client (using the link below) or … | |
InputStream in = new FileInputStream(new File("Pirates of Caribbean.wav")); AudioStream musicin; musicin= new AudioStream(in); AudioPlayer.player.start(musicin); i wrote above it works but after sometime music ends but i want to play it always how can i achieve it | |
Is possible to play in different channels, different .wav files in order to mix them? How? There is any library or API that I can use to do that? Because I only have found this for MIDI sounds. Thanks! | |
when ı add two panels into a frame last panel i added seen on the screeen how can i show both panels in one frame | |
I created a Java class that inserts and updates an Oracle 9i database. I am running single insert and single update statements. The below is what I have been using and was wondering if it is efficient or anyway to improve it: [code=java] public class DbWork { private Connection connection … | |
I am trying to write a fairly simple app for a Dell Axim running PocketPC 2003 and the Mysaifu JVM. I'm using NetBeans to develop the app. NetBeans emulators (weak as they are) can run my app just fine. But when I try it on the PDA I get a … | |
Hi all, I need help in polymorphic variables concept ,Are there any polymorphic variables in the code belowand Explain why? thnks.. [CODE]class Square { protected int side; public Square (int s) { side = s; } public int getSide() { return side; } } [/CODE] [CODE]class Container { protected static … | |
hi, Iam using tomca,mysql.In my appl ,i wrote a code to upload an image using jps.its working fine in my system.But wen i access my appl from another system(in LAN),iam unable to upload the image.p[lz tell me wats wrong in my code PreparedStatement st=con.prepareStatement("update login set photo=? where uid=?"); File … | |
The Game The game involves 10 words, which make up the nonsense sentence, “to tip pods on pan is as a tad din”. Two players take it in turn to take a word. The winner is the player who takes words containing all of any one of the letters involved … | |
What do you guys think of JavaScript-heavy forums such as DaniWeb? Would you rather spend time on a forum with a very unique skin and all the bells and whistles, or something very simplistic and standard that's quick loading and far less confusing? | |
Lemme first greet all my beloved fellows and i would love to give you all credits for helping each other with problems concerning java!!! I have a problem with listening methods in my code.the only respond i get is the exit part of my buttons....please i would be happy to … | |
Hello All. This program lets the user select any three points within the applet window and draw a triangle. It then prints out the perimeter of the triangle and the area of the triangle. After the user has selected three points, you should then be able to click a fourth … | |
Hi Everybody, I wrote below codes which check textfiled and comco box for equals. But i want write a integer in textfiled and check it with combobox; For example When i write in texfiled 10 in the 10. on combobox is Balıkesir so if i select Balıkesir it's true but … | |
First of all, here's my codes: [code=java] public class SLLNode { protected Object element; protected SLLNode succ; protected SLLNode( Object elem, SLLNode successor ) { element = elem; succ = successor; } } [/code] [code=java] public class LinkedStack { private SLLNode top; public LinkedStack( ) { top = null; } … | |
:o does anyone know how to write this for me i have no idea i need help Outline: Java is a powerful Object Oriented Programming (OOP) language specifically designed for use with the internet. However, this makes learning Java fairly difficult. So we will start with a simple (text-based) program. … |
The End.