32,204 Topics
| |
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 … |
| |
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 … | |
heres's my code : [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package javaapplication11; import java.awt.*; import java.awt.event.*; import javax.swing.*; /** * * @author Jayson Jude */ public class JavaApplication11 implements ActionListener { private JFrame window = new JFrame("Tic-Tac-Toe"); … | |
So I am supposed to write a class that converts fahrenheit to celsius (& vice versa), calculates the volume of a sphere after a radius is entered, and calculates the hypotenuse of a right triangle, all using nothing but static methods. Here is what I have so far; [CODE]class Fun … | |
can you urgently suggest codes for me its proxy cache/ http request and response plz | |
[CODE] import java.io.*; public class CheckersGame { public static void main (String []args) throws IOException { BufferedReader jill = new BufferedReader (new InputStreamReader (System.in)); System.out.print("Enter name of the first to move: "); String name = jill.readLine(); System.out.print("Enter name of " + name + "'s opponent: "); String opo = jill.readLine(); … | |
So the prelab for my CSE class asks Your assignment in version 1 is to write a Java program that lets you select six lottery numbers. For this version, you can accept any six values including duplicates. Your program must have the following elements: - Create a class named Lottery1 … | |
hello all I found the sample code ,but do not understand how the author found the value of width and height in the frame,anyone can tell me ? frame.setSize(120, 285); According to my count the value must be : frame.setSize(110,250); thank you denny [code]import javax.swing.*; import java.awt.Color; public class Traffic_Lights{ … | |
Hi there, I have a dynamic programming problem and I have NO idea where to start. You are given an input of integers and mathematical expressions. For example, you are given: 5 + 3 * 2. The program processes this input. It ignores the BEDMAS rules, and returns the highest … | |
Holler fellow programmers I have an error that's been bugging me for almost a day now: I keep getting 14 of this error: class, interface, or enum expected Yes, 14 different exact same error message basically for every line of code in the inputGetter method below. Can someone please help... … | |
Hello forum: I have to set the position of 4 labels, though in this example I'm only starting with one. for some reason even though I do setLocation(40,50) it is not working. Any ideas? The code of the small part ; If you guys want the entire program Ill post … |
The End.