32,204 Topics

Member Avatar for
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
63
Member Avatar for sciprog1

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

Member Avatar for Dupron
0
138
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
62
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
46
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
991
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
90
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
463
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
73
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
148
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
132
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
668
Member Avatar for kamweshi

Hi, can anyone help me to split the servlet(week02_4) so that only control code remains.I need to forward/redirect request/responses to two other servlets(VowelFrequencyServlet and WordCountServlet).I am not sure where to place the RequestDispatcher. Week02_04 servlet: [CODE=java]package servlets; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class Week02_04 extends HttpServlet { protected …

0
120
Member Avatar for johnlop1

So i have this input.txt file, and there are 5 entries in it, I want to take each entry( in the format of Image1.jpg, Image2,jpg, etc) and store it into an arraylist. Then use java GUI to display each image by clicking a button, from image1 to image5. First I …

Member Avatar for JamesCherrill
0
114
Member Avatar for Megha SR

what is the difference between call by value and call by refers=ence? can you please give an example to illustrate it?

Member Avatar for peter_budo
0
70
Member Avatar for Intrevix

I'm having a lot of trouble understanding an assignment we were given today. It has to be written using only loops. I'm finding it a little hard to comprehend right now, so just a bit of guidance on where to start would be great. I understand that the program would …

Member Avatar for JamesCherrill
0
132
Member Avatar for sam1

hi I was wondering which one do you think is the best? I have been using netbeans but have no experience with eclipse, so i can not say which one is best :lol:

Member Avatar for peter_budo
0
104
Member Avatar for acidking001

I am using Netbeans. I have one JFrame with JMenu, and one JDialog. I want to show the dialog when i click the menu, but it doesn't work. I only wrote this codes to my jframe and i didn't add or change any codes on the dialog: [CODE] private void …

Member Avatar for peter_budo
0
312
Member Avatar for shreeswetha
Member Avatar for otherdummy

Hi, I have just started my first semester in a Bachelor program 'Computer Engineering'. I have above basic knovledge in Java SE and currently am interested in Python. The problem is that I'm facing some difficulties in determing my purposes about my future career in IT field. I used to …

Member Avatar for etftw
0
248
Member Avatar for starkz_123

[CODE] #include<stdio.h> #include<math.h> #define min(a,b) (((a)>(b))?(b):(a)) #define abs(a) (((a)>(-(a)))?(a):(-(a))) void convert( int bod, int *x, int *y, int *z ) { int a; int b; int c, str, zb; if( bod==1 ) { *x=0; *y=0; *z=0; return; } a=(bod-2)/6; b=(-1.0+sqrt(1+8*a))/2.0; c=bod-1-3*b*(b+1); ++b; str=(c-1)/b; zb=c-str*b; switch( str ) { case 0: …

Member Avatar for digital29
-1
224
Member Avatar for fofo123

using java netbeans you will try to use "brute force" to decrypt an encrypted message, where you only have the first 96-bits of the 128-bit secret key (last 4 bytes of the secret key are missing!) The program should be called findk, and invoked as follows: findk cipher_file key_file where …

-2
39

The End.