32,204 Topics

Member Avatar for
Member Avatar for coco24

Hi, I am trying to compare two objects, but it is not working correctly. Please help. [CODE]/** * Compares theObject with <CODE>this</CODE> object for * equivalence. Do not concern yourself with runtime * efficiency. * @param theObject to be compared with this object * @return true if theObject is equivalent …

Member Avatar for anon12
0
79
Member Avatar for gavriela

Hello, I'm a student working on my first hands-on assignment. One of the questions is this: Q4: Write a program that converts a user input temperature from degree Celsius to Fahrenheit or Fahrenheit to Celsius using: C = 5 (F -32)/9 or F = 9C/5 + 32 The user must …

Member Avatar for ~s.o.s~
0
411
Member Avatar for 3vilwyatt

So I am a bit confused with the following terms already and how they interact. I am new to IM creation and I want to know the best approach on how to go about this. Anybody can explain them to me? I know ejabberd is a kind of open source …

Member Avatar for 3vilwyatt
0
115
Member Avatar for Mabyboi

Hey guys, Im having a really hard time with this, I've been searching and trying to work at this for hours but cant get anything to work. If you guys could help it would be amazing. Essentially what I need to do is take this code thats been provided to …

0
56
Member Avatar for jrosh

I wrote a web service to connect to mysql database. But I can't find a way to call it from the j2me midlet to pass parameters to the web service. Please help me with this.

Member Avatar for jrosh
0
89
Member Avatar for Taimoor Rana

Hello Lovely People, Please have a look at my GUI first, before reading the rest (I've attached a picture, see at the end of my post). I'm having two problem with this GUI. 1) I don't want my Start button to be as long as it is. I want it …

Member Avatar for Taimoor Rana
0
177
Member Avatar for sariberri

The rubric says "In a new class, write a static insertion sort method that takes in an array of Comparable objects...In this new class, create a main that tests your code by making an array of TravelGuide objects and passing it into your insertion sort. Also test that your code …

Member Avatar for ztini
0
3K
Member Avatar for carinlynchin

okay so I have an array of buttons, and at some point in the program I want to access the index of a button clicked in order to perform some calculations....so there are two options that I can think of...maybe there is a method to pull out the index (2d …

Member Avatar for carinlynchin
0
139
Member Avatar for black_berry

Hello, I have two classes, Help and RecylingGui. I have a button on the RecyclingGui called Help, which when clicked should open the text area created in the Help class. I added the ActionListener for this but nothing is happening. Any help would be appreciated. Thanks. The Code: Recycling Class …

Member Avatar for quuba
0
346
Member Avatar for StevoLord

Found this sniplet of code on various websites to use this way of playing a wav file however im getting this error message. javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input file Update 1 - I know the wav file has to be 8khz, is there a way to …

Member Avatar for StevoLord
0
4K
Member Avatar for ramanak.24

Hi to all, i just want to know where can i get the scjp voucher and the validity as well.since i am living in hyderabad i am a employee. Is it possible to get the voucher from prometric cneters if yes, please do let me know where are these centers …

Member Avatar for ramanak.24
0
81
Member Avatar for infinitus

Hello, i have came across a problem when trying to create a hangman game. I want to read a String of letters inputed from keyboard and then i want someone else to guess this word(typical hangman rules). I have used this code. [CODE]InputStreamReader FindWord = new InputStreamReader(System.in); BufferedReader in = …

Member Avatar for harsuraj
0
407
Member Avatar for zach&kody

My friend and I are in a Computer Science I class, and we are momentarily working on a project which asks you to import a method from a previously edited source, into another java source file. Here is our code. [CODE]import java.awt.Graphics; import java.awt.Color; import java.awt.Image; import java.awt.Container; import javax.swing.JFrame; …

Member Avatar for zach&kody
0
6K
Member Avatar for amrita111
Member Avatar for JamesCherrill
0
91
Member Avatar for ahmed_fawzy

Hey Guys i want to create keyUp and keyDown Events on JTable to get value at particular cell as i press up key and Down Key ,i tried to do it and succeeded in KeyDown Event which is : [CODE] ProductTable.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent k){ ProductTable_KeyPressed(k); } }); …

Member Avatar for JamesCherrill
0
181
Member Avatar for addlou

I need to write a loop to go through a string and retrieve alternate characters from index positions. Then append the characters to another string and then print (eg. "pleasehelp" = "peshl") I have hit a wall and lack any sort of know how to push through... what have I …

Member Avatar for Momerath
0
622
Member Avatar for stephy1

I got one interview question, what's the advantage of objects in java ? I surfed, surfing regarding these.

Member Avatar for Momerath
0
70
Member Avatar for lashbandi

Hi... my programs compiles and runs fine...but i still get this error..what am i doing wrong in here... its suppose to print polynomials... [CODE]import java.util.*; public class PolyTest { { public static void main(String[] args) { Scanner stdin =new Scanner(System.in); Polynomial polynomial = new Polynomial(); int coefficients; //= { 2, …

Member Avatar for JamesCherrill
0
802
Member Avatar for sanam_1

dear programmers, i need help with one of my java program. the program should ask the user to enter a sentence and the then return the number of repeated characters in a row. as a example if the user enter "myy naame is joshh"the user should return "3 repeated characters" …

Member Avatar for stultuske
0
80
Member Avatar for isamuhunter

Hello there...I need some help when I'm trying to pop data (numbers) from an array into another one (push them). I managed perfectly to input data but I'm completly lost when trying to pop from one array and push it into another one, I tried many things but none of …

Member Avatar for javaAddict
0
177
Member Avatar for EmbeddedHelp

Hi all, (Firstly please note I am a beginner programmer!). I have the following code where I am trying to print the data base entries, then the user press the space bar to add another entry, followed by the data base contents being printed again. Any pointers in the right …

Member Avatar for javaAddict
0
186
Member Avatar for terzenta

I've been messing around trying to figure out why I'm getting this compiler error for a few hours, and I'm just not sorting it out. Any help would be appreciated. Thanks, David Code: [code] package dladoucer_week5; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input …

Member Avatar for terzenta
0
238
Member Avatar for NickJoe

Hello, I've looked all over the web and can't seem to find how to do this, so I'll try here. I'm working in a program in which i need to draw shapes, specifically irregular polygons. I figured the easiest way to do this, and the one that makes the most …

Member Avatar for JamesCherrill
0
280
Member Avatar for atticusMom

I have all figured out I think except exercise 7.20 Extend zuul by adding an Class called item. Each item is created with a description such as rock or stick and a weight. When creating rooms and setting their exits, items for this game should also be created. When player …

Member Avatar for atticusMom
1
5K
Member Avatar for Newskin01

There is a great deal of information out there on printing arrays in toString() but most suggest using Arrays.toString(arr); This however prints the whole array even the nulls and is formatted a specific way. I'm looking for a way to print the values in an array that are not null …

Member Avatar for jon.kiparsky
0
2K
Member Avatar for Amoryethel

Hi, I'm writing a program that reverses the words of a text file using the LinkedList structure. Unfortunately, I have received the following error: [CODE]java.util.Scanner[delimiters=\p{javaWhitespace}+][position=30][match valid=false][need input=false][source closed=true][skipped=false][group separator=\,][decimal separator=\.][positive prefix=][negative prefix=\Q-\E][positive suffix=][negative suffix=][NaN string=\Q?\E][infinity string=\Q?\E] [/CODE] And because of that I'm having difficulty proceeding to the next step. If …

Member Avatar for ztini
0
206
Member Avatar for kukuruku

Hi,if I have array of objects {first(name,age),second(name,age)} How can I access first (name) in java Thanks

Member Avatar for javaAddict
0
166
Member Avatar for himanshu1051

[CODE] 1. int[][] board = new int[][] {{1,0,0},{0,1,0},{1,2,1}} [/CODE] please explain how we have used index here....like row and column....i know about this we have an array, a, with two rows and four columns. [CODE]int[][] a = new int[2][4];[/CODE] // Two rows and four columns. but what about the 1. …

Member Avatar for JamesCherrill
0
152
Member Avatar for Java NOOB

Hello, I am having a problum working on a project. how do I initialized a something that I do not want a varaiable to effect. [CODE]import java.lang.*; import java.util.Scanner; public class HW05_03 { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int angleInDeg; double angleInRadians = Math.toRadians(angleInDeg); …

Member Avatar for JamesCherrill
0
132
Member Avatar for Spirit_Guardian

I am trying to compile my simple java code and receive two errors. Any help will be appreciated. 1. Java1_Week2.java:19: illegal start of expression public Java1_Week2() { 2. Java1_Week2.java:19: ';' expected public Java1_Week2(){ Here is my code: [CODE]import java.text.DecimalFormat; import javax.swing.*; public class Java1_Week2 { public static void main(String[] args) …

Member Avatar for Spirit_Guardian
0
207

The End.