35,618 Topics

Member Avatar for
Member Avatar for Stjerne

Hello guys, I need help with one task. I've to make a program which generates random numbers and stores them in an array. How many numbers to be extracted depends on the arrays length, which are parameters in the class constructor. The array needs to contain only one instence of …

Member Avatar for JeffGrigg
0
166
Member Avatar for Mi_99

he question is to get my shapes to change over time according to some criteria of my own design therefore i tried to make the shape change size as it hits certain coordinates but it would turn into line and keep moving as lines below is my move method to …

Member Avatar for Taywin
0
110
Member Avatar for mohamed moamen
1
82
Member Avatar for javaNooblet

Hi All, The GUI works as intended to. But I was wondering if some of you java gurus could look over my code and maybe give me some tips on how I could have written this code better. Thanks! [B]GUI CLASS: [/B] [CODE]import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.*; …

Member Avatar for hfx642
0
229
Member Avatar for fonzi

So i have been assigned a program where i create a interface a bag and the main or tester i have been trying to get this done for a while now and so far two other people have checked my work and have no idea why my list prints the …

Member Avatar for fonzi
0
180
Member Avatar for Sunyata

Hi, I'm trying to make a program which reads a text as an input and counts the letters as an output. For example, if my input is: "Hello, my name is Alan", I want my output to be: A = 3, B = 0, C = 0, D = 0, …

Member Avatar for Taywin
0
143
Member Avatar for fraandres

I'm getting a error code : java:23: error: cannot find symbol monthlyPayment=(balance*(interest/12))/(1-(Math.pow(1/(1+(interest/12)),(numberOfYears*12)))); ^ symbol: method pow(double,int) location: class Math 1 error it's pointing at Math.pow, but I dont understand what else to do thank you for any help. [code] import java.util.*; public class Loan { public static void main(String[] args) …

Member Avatar for Taywin
0
221
Member Avatar for torkolort

Hi, My problem is pretty simple, but I'm not sure about the solution. The idea is simply to send a list with an unknown number of java objects from a servlet to a jsp page, and display the objects as checkboxes on the page. The user should then check the …

0
66
Member Avatar for buba_kazouba

i am trying to make a program that edits contacts on a Nokia phone using J2ME but i don't know how to access the contacts help please

Member Avatar for peter_budo
0
169
Member Avatar for JamesCherrill

The sort methods for collections specifies that the parameter must be a collection of objects that implement Comparable for their own class or superclass, eg [CODE]public static <T extends Comparable<? super T>> void sort(List<T> list)[/CODE] Can anyone tell me how to define an ArrayList that will only accept such objects? …

Member Avatar for ~s.o.s~
0
187
Member Avatar for buba_kazouba

i am trying to make a program that edits contacts on a Nokia phone using J2ME but i don't know how to access the contacts help please

Member Avatar for buba_kazouba
0
178
Member Avatar for rezial

ok for some reason I keep getting this error. I know that it normally happens when u forget to put in a curly brace and the compiler thinks your trying to define a function within a function but I cant seem to fix the error sooo hopefully someone here would …

Member Avatar for JamesCherrill
0
199
Member Avatar for jigglypuff13

I am having problems running a JSP with a java class file on a Tomcat server. My files are located at: tomcat/webapps/ROOT/temp.jsp tomcat/webapps/ROOT/WEB-INF/classes/tempbeans/TempBean.class The contents of my JSP file: [CODE]<%@ page import="tempbeans.*" %> <% TempBean bean = new TempBean(); %>[/CODE] The contents of my class file. package tempbeans; [CODE] package …

Member Avatar for javaAddict
0
379
Member Avatar for yup790

I was wondering which language should learn. I do not want to be a programmer for a job(at the moment I am a young teen) in the future, I would like to be a physicist. In the meantime though I would like to learn a programming language. I want to …

Member Avatar for JamesCherrill
0
256
Member Avatar for mrjillberth

I am going to do my first Java Project the ElGamal's Encryption. Honestly, i have no idea yet on how to start my program because i don't have idea in encryption but i have to do it. Because it was assigned to me by our instructor. Please help me.

Member Avatar for mrjillberth
0
1K
Member Avatar for nered

I recall back in school we worked on a small program for database management and we wrote a method which contained instructions for establishing a connection. Connection con(){} con(); // Would return an open connection Can this be applied to JFrame ? For instance i am making a 800x600 GUI …

Member Avatar for nered
0
80
Member Avatar for yuki_lyn

Hello, I need some opinions about my project development and studies. My project is entitled Voice E-mail, in which I create an email client server while using the TTS to read the message content aloud. I'm having second thoughts of using NetBeans, since I'm not really good at Java. Is …

0
92
Member Avatar for eddieteddie
0
69
Member Avatar for ranu jain

hello, i just want to know what is the need that we make a custom tag...i know that its for reusebility..but i want some examples where should i use them. thanks

0
84
Member Avatar for dancks

The original question I posted on Yahoo Answers: [url]http://answers.yahoo.com/question/index;_ylt=Au6uML15p1p500urP_yfL9fsy6IX;_ylv=3?qid=20111002100030AAILsNC[/url] I can't get this code to return anything: In NewVector.java: a class that extends Vector: [code]public Object getSmallest() { Object obj = elementData[0]; try { String a = (String)elementData[0]; for(int i=1;i<elementCount;i++) { String b = (String)elementData[i]; if(a.compareTo(b)>0) { a = b; …

Member Avatar for JamesCherrill
0
199
Member Avatar for aldeene

what's wrong with my code? i'm new to java, can someone help me? the data is not showing. [CODE] public class GUI { private static JTextField fname = null; private static JTextField lname = null; private static JTextField search = null; private JPanel panel = null; private JPanel tablePanel = …

Member Avatar for mKorbel
0
166
Member Avatar for RM@Bowdoin

I implore you to ignore the poor formatting, ignore the overall functionality even; my problem lies with trying to call the Scanner scan within flow method from readBoolean and readBoolean2D methods. It says it cannot find variable scan. How can I access this variable? [CODE] import java.util.*; import java.io.*; public …

Member Avatar for ~s.o.s~
0
338
Member Avatar for rm_java

i have a csv(excel outputted) file and i have loaded all the data into an array, and i want to know how to use the array to search the data in the array using binary search tree. any ideas on how to do this?? i have made a binary search …

Member Avatar for ~s.o.s~
0
121
Member Avatar for ynwa

import java.awt.*; import java.awt.image.*; import java.awt.geom.*; import java.lang.Exception.*; import java.io.*; import javax.imageio.*; import javax.imageio.ImageIO; import java.net.*; import java.net.MalformedURLException; class Blur1 { public static void main ( String [] args) { float[] matrix = {0.111f, 0.111f, 0.111f, 0.111f, 0.111f, 0.111f, 0.111f, 0.111f, 0.111f, }; BufferedImage sourceImage = null; try { URL …

Member Avatar for stultuske
0
608
Member Avatar for anand01
Member Avatar for anand01
0
3K
Member Avatar for cig_buttz

I wanted to create this program which lets the user choose from the 4 number systems, binary,decimal,hexadecimal, and octal. inputs a number for the chosen number system, then converts it to the other three number systems. Help anyone?

Member Avatar for josephbeluan
0
126
Member Avatar for evlmangesh

Hi guys, This code has been on my back since a few days now and I kinda need help on it ASAP. Basically what I wanna do is use PipedInputStream and PipedOutputStream to accurately time thread create operations. So I have to calculate System.nanoTime() in the run() method of the …

0
100
Member Avatar for Blink383

I cannot get past this error. I had taken out the dataSort method which allowed it to compile, however I need the data to sort for my assignment. When it compiled the data was not passing through my constructors, I got no data output. Any assistance is greatly appreciated . …

Member Avatar for Taywin
0
369
Member Avatar for harveylester

I recently hired a freelancer to validate all the code for my Wordpress e-commerce website ([url]http://www.projectdisobey.com/disobeyclothing[/url]) He told me that he had finished validating everything, but when I tested each page out using the validation service at [url]http://validator.w3.org/[/url], I came across a whole load of validation errors ([url]http://imageshack.us/f/836/validationerrors.jpg/[/url]). I notified …

0
50
Member Avatar for ARaza110

[CODE]public class cation { public static void main(String[] args) { new cation().run(); } public void run(){ harada hara=new harada(); insert(hara); insert(hara); } public void insert(harada hara){ if(hara.left==null){ hara.left=new harada(); } else{ insert(hara.left); } } class harada{ harada left; public harada(){} } } [/CODE] Can someone please explain, recursion in objects …

Member Avatar for ARaza110
0
171

The End.