32,204 Topics
| |
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 … | |
Hello Members, What is the largest integer that can be stored in Java? Thank you!! | |
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:"); … | |
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 … | |
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]: … | |
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; /** … | |
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 … | |
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 … | |
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 … | |
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> … | |
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 … | |
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... | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
what is the difference between call by value and call by refers=ence? can you please give an example to illustrate it? | |
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 … | |
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: | |
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 … | |
wht is inner class?..........pls tell me d concept bwehind dis | |
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 … | |
[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: … | |
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 … |
The End.