35,618 Topics
![]() | |
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 … | |
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 … | |
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.*; … ![]() | |
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 … | |
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, … | |
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) … | |
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 … | |
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 | |
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? … | |
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 | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
![]() | 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 … |
| |
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 | |
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; … | |
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 = … | |
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 … | |
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 … | |
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 … | |
Hi all, can any one tell me how to find unique values in array list? Thanks in advance.. | |
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? | |
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 … | |
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 . … | |
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 … | |
[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 … |
The End.