31,001 Topics

Member Avatar for
Member Avatar for Claude2005

Hi there, I have this kind of sample table. [CODE] Name Math Science English ------------------------------- Ben 86 88 80 Peter 80 79 83 John 84 90 86 [/CODE] I want to save this result, dynamically, in a "table" in Java. I want it to have a sorting function. Some of …

Member Avatar for Claude2005
0
110
Member Avatar for Blastoise

Write a program to enter a score and a points possible for a test, computer the percent, display the percent to 1 decimal place and then display the letter grade (A – F) using a standard scale (90, 80, 70, 60) – use the if ... else if ... else …

Member Avatar for floatingDivs
0
130
Member Avatar for vij123

[CODE]<s:iterator value="listObject"> <s:component template="abc.vm"> <s:param name="text" value="listKey" /> <s:param name="prefix" value="listIndex" /> </s:component> </s:iterator>[/CODE] listKey is keys in a list. i am using iterator to traverse the list. i want to put here internationalization concept.so that when i write key of list then it find its associated values in a …

0
57
Member Avatar for lena13

2. Create a class Reals for performing integer arithmetic on real numbers. Each real number has a whole part and a decimal part; your class should contain data components representing both parts as integers and should contain methods to do the following: a. Default constructor b. set the two components …

Member Avatar for Xufyan
0
64
Member Avatar for Born2Bgeek

Anyone can to help me solve my java problem? I want 2 shapes to move at the same time when mouse dragged occurs. For example 2 objects name hat and face are created then when I mouseDragged face both face and hat will move together, but when I dragged hat …

Member Avatar for JamesCherrill
0
124
Member Avatar for rizla777

hey im just having a bit of a problem on reading input from a text file. I know that it is probably something simple but I keep overthinking it. Here is what I am trying to do: I'm trying to read in a line of text that contains musical notes. …

Member Avatar for new_programmer
0
145
Member Avatar for diggerman

I'm writing a program that will ask the user for input and then store it into an array until called to the output screen. here is an example of my code so far. I have no idea how to get the input to store in the array. import java.util.Scanner; public …

Member Avatar for diggerman
0
13K
Member Avatar for kezkez

new to ArrayList and was wondering what I am doing wrong. I keep getting a null pointer exception when trying to addRecord... [CODE] import java.util.*; public class StudentDB { private List<String> studentDB; public StudentDB(String db) { List<String> studentDB = new ArrayList <String>(); studentDB.add(""); } public void addRecord(String recordAdd) { studentDB.add(recordAdd); …

Member Avatar for JamesCherrill
0
75
Member Avatar for Xufyan

I've coded this program but i am getting this error, EmployeeeMain.java:57: non-static method getdata() cannot be referenced from a s tatic context Manager.getdata(); ^ 1 error I've used the same technique in other program , it is working fine but this program is not working !! Why I am getting …

Member Avatar for JamesCherrill
0
367
Member Avatar for juice33

I have been incurring errors during compile, in which I cannot seem to figure out where the problem relies. I have a class file which is different from the java file. When running the java file im recieving the error of cannot find symbol. {note both of the files are …

Member Avatar for JamesCherrill
0
103
Member Avatar for TheKebab

I've just started learning some Java, and now I've stumbled upon what may be my biggest enemy so far, Applets. To begin with, they are inconvenient to code and and test. You have to build them in the IDE, (Using Netbeans as of now) create an external HTML which can …

0
61
Member Avatar for sciprog1

Hello Members, What is the largest integer that can be stored in Java? Thank you!!

Member Avatar for Dupron
0
123
Member Avatar for moustafa taha

hello every one this program compares loans with various interest rates [CODE] public static void main(String[] args) { Scanner input=new Scanner(System.in); //Prompt the user to enter the loan amount System.out.print("Enter the loan amount:"); int loanAmount=input.nextInt(); //Promp the user to enter the period in number of years System.out.print("Enter number of years:"); …

Member Avatar for Dupron
0
137
Member Avatar for asian_al

Im trying to make a breakout game. I cant seem get the score to show up, but I was able to get everything else working. [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class PongPanel extends JPanel implements ActionListener { private Paddle paddle = new Paddle(); private PongBall ball = new …

0
61
Member Avatar for AmnGupta

Hi everyone, I'm working in netbeans IDE 6.9 for my college project work. I had made my application in such a way that, using single Desktop Pane I used to add all the JInternal Frame to it, and display one by click on the respective menuitem. For e.g. for [B]MenuItem1[/B]: …

0
45
Member Avatar for deleti0n

I don't know why it throws the exception any ideals?? heres my error: the line it tells me is throwing the exception is highlighted in red: run: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4 at lab32analyzingscores.Main.main(Main.java:15) Java Result: 1 BUILD SUCCESSFUL (total time: 11 seconds) [CODE] package lab32analyzingscores; import javax.swing.JOptionPane; /** …

Member Avatar for deleti0n
0
127
Member Avatar for ubc_dc

Hi all, I'm looking to program a webcrawler which will be used to search for specific strings in a large website. I'm thinking that it would be ridiculous to store each downloaded page locally, and then parse it for the strings but I really don't know how else I could …

Member Avatar for ~s.o.s~
0
105
Member Avatar for PDB1982

How do I, if it's possible, take in user input to fill an ArrayList<Integer>? This is what I have so far, but the code doesn't let me incorporate user input. I'm having a hard time figuring this one out... [code] import java.util.*; public class Duplicates { Scanner input = new …

Member Avatar for eman 22
0
988
Member Avatar for flyingcurry

The program is supposed to find all the combinations of the letters in "computer", the algorithm was given to me, but I don't have any idea of how it dos its work, all I get from this is a an infinite amount of "nullp" Here is the code: [CODE] public …

0
89
Member Avatar for PDB1982

I'm trying to find a way to find, and remove, duplicates in an ArrayList without using sets or hashes. This is what I have so far, but I keep getting the following error: [code] import java.util.*; public class Duplicates { Scanner input = new Scanner( System.in ); int i; ArrayList<Integer> …

Member Avatar for PDB1982
0
462
Member Avatar for Sammy91

I have written a program that does exactly what I want it to do, except one problem. I cannot get the program to loop properly. In its current state, it will ask for an input, process that input and then provide an output, it will then ask the user again …

0
52
Member Avatar for Noorul Ariff

Hi friends... My friend s doing an online project... He wants to know how many users(REGISTERED) are LOGGED-IN CURRENTLY in his site... i.e if i'm ADMINISTRATOR of this DANIWEB, i want to know the USERS CURRENTLY LOGGED-IN... I need the logic for this... Help me... Thanks in advance...

Member Avatar for sirlink99
0
72
Member Avatar for andufie

I need help doing this homework. I have spent more than a week doing this without any success The suggestion is to maintain two extra links in each node, one to the inorder predecessor and one to the inorder successor in the tree. Implement this idea, and write code to …

0
90
Member Avatar for iphoneepidemic

I have to use constructors in my assignment so i decided to create two mazes (using arrays) and save them in two separate classes (maze1 and maze2). Then i called the array and save the reference to another array named mazeChoice (Line 23) . After, i try to print out …

Member Avatar for iphoneepidemic
0
282
Member Avatar for endsamsara

Hi, well I need to do a program in Java that shows the solution of the famous game 8 puzzle (the object of the game is to place the tiles in their place with the less possible movements) So using the class Astar Given by our teacher we are asked …

Member Avatar for Weixing
-1
5K
Member Avatar for jems5

I am trying to output a checker pattern into a two dimensional array. How do I assign two characters in order to do this? Note array is a square [5][5] Please help. [CODE]// Takes two symbols and places them in alternate cells of board public static char[][] placeSymbols(char charY, char …

Member Avatar for jems5
0
2K
Member Avatar for gedas

hey everyone, i am creating a project from already created code below. this is just one class of it. this class projects 4 or less points on the image. the source for those points is received from wii (gaming consoles) remote that tracks infra-red light so it displays infra-red light …

Member Avatar for gedas
0
140
Member Avatar for rinjin07

YO, I would be EXTREMELY grateful if someone can help me out with some boolean method stuff. I have this assignment where we've been building up this bank account project thing, and at the moment I've been asked to put in a boolean method called inBalance that returns true if …

Member Avatar for rinjin07
0
190
Member Avatar for iphoneepidemic

I have to use constructors in my assignment so i decided to create two mazes (using arrays) and save them in two separate classes (maze1 and maze2). Then i called the array and save the reference to another array named mazeChoice (Line 23) . After, i try to print out …

Member Avatar for iphoneepidemic
0
121
Member Avatar for AaronLLF

I followed through a Java/LWJGL n lloydgoodall.com for a first person camera. There were about 33 errors that I fixed, though I get a message in the Eclipse console "java.lang.NoSuchMethodError: main Exception in thread "main" " Here is my code: [code] import org.lwjgl.Sys; import org.lwjgl.opengl.Display; import org.lwjgl.opengl.GL11; import org.lwjgl.input.*; import …

Member Avatar for kramerd
0
657

The End.