32,204 Topics

Member Avatar for
Member Avatar for StephNicolaou
Member Avatar for hayden11

Please help. I ask the users to give me a char (either X or O), but when the users play the game, all they see are squares. Thanks!! [CODE]//game class import java.util.Scanner; public class Game { Player player1; Player player2; Board gameBoard; public Game() { player1 = new Player(); player2 …

Member Avatar for hayden11
0
435
Member Avatar for lele07060

Hello everyone, I am new to this java programming and wanted to know if anyone could solve this problem for me. I would greatly appreciate it. Thank you! "Write a program that asks the user for 2 integers a and b, the program displays their sum, difference, product, quotient a/b, …

Member Avatar for JeffGrigg
0
3K
Member Avatar for lbgladson

I have an assignment to create a class Input and have method public static int readInt(Scanner in, String prompt, String error, int min, int max) I was provided the main method but have no idea what I'm supposed to be putting in the class Input. This is what I have: …

Member Avatar for stultuske
0
167
Member Avatar for looklikeasfine

Write a program that computes the average and standard deviation of the text floating point numbers in a file. Use the following formulas for the average and the standard deviation of N values. The formulas compute the sum, the sum of squares, the average, the average square, the variance, and …

Member Avatar for stultuske
0
111
Member Avatar for javaman2

The standard deviation of a list of numbers is a measure of how much the numbers deviate from the average. If the standard deviation is small, the numbers are clustered close to the average. If the standard deviation is large, the numbers are scattered far from the average. The standard …

Member Avatar for stultuske
0
2K
Member Avatar for jwala

I tried to broadcast an object using object serialization and UDP connection. I am using netbeans IDE and i use a Java Desktop Application for both sending and receiving ends.Obect is broadcasted when a button is clicked. And i get the following exception... Oct 29, 2011 1:50:04 PM receive1.Receive1View jButton1ActionPerformed …

Member Avatar for peter_budo
0
355
Member Avatar for jwala

I have a server to which clients are connected using TCP connection. All the clients broadcast to each other using UDP braodcasting.I want to disconnect one of the client from the UDP connections from server. what can be the possible ways to do this? please suggest.

Member Avatar for jwala
0
267
Member Avatar for mike2828

i need to Pass in three integers corresponding to an RGB value and use the appropriate Color constructor to set the background color. [CODE]import java.applet.*; import java.awt.*; public class AnAppletSubclass2b extends Applet { int r; int g; int b; //Color color = new Color (r,g,b); public void init() { String …

Member Avatar for PkayC
0
178
Member Avatar for ali11

I need help in creating a RPN calculator! I'm currently stuck in making a stack. here is my codes so for.This is my first time I am using stack. [code] import java.util.Stack; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.math.*; public class JavaCalculator extends JFrame{ Stack s = new Stack(); …

Member Avatar for stultuske
0
542
Member Avatar for lele07060

I really need help with the computer science class & the tutors at my school do not fit into my schedule. Would anyone be willing to help me with some of my labs?

Member Avatar for stultuske
0
102
Member Avatar for ARaza110

Can someone please help me out that how execution of Inter-process communication in java is done, where a single process tries to receive from two mailboxes. I mean the send() and receive() operations?

Member Avatar for stevanity
0
166
Member Avatar for pseudorandom21

What is the equivalent of the "setw" stream manipulator for C++ in Java? I've been messing with the java.util.formatter class, but haven't figured this out yet? [url]http://www.cplusplus.com/reference/iostream/manipulators/setw/[/url]

Member Avatar for stevanity
0
132
Member Avatar for jinglylime

Hi how do you delete the input on the textfield after a button is pressed. Thanks

Member Avatar for jinglylime
0
70
Member Avatar for ali11

I need help in creating a RPN calculator! I'm currently stuck in making a stack. here is my codes so for. [CODE]/** * * * */ import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.math.*; public class JavaCalculator extends JFrame{ private JFrame f; private JPanel p1,p2; private JTextField jtfMain; private JButton …

Member Avatar for JeffGrigg
0
294
Member Avatar for lbgladson

I wrote a program called Geometry that finds the volume and surface area of a sphere, cone and cylinder. I have to use JUnit 4 Testing to test the separate classes. I have written the following code but when I run the test it says it fails even though my …

Member Avatar for JeffGrigg
0
185
Member Avatar for aanders5

How would I get a value in between the two quotes after value=? So, value="hi my name is bob" /> would return: hi my name is bob or value="Ouch! "that hurt" lol..." /> would return: Ouch! "that hurt" lol... so basically I know the value=" TEXT_HERE " /> will always …

Member Avatar for aanders5
0
336
Member Avatar for Hikari123

Hi, I am suppose to create a code that takes the values between 1-1000 and produces the hailstone sequence for them, then it prints out the initial value that produced the longest sequence along with the sequence's length. I have tried to use an array but it didn't seem to …

Member Avatar for Hikari123
0
839
Member Avatar for DaniwebOS

Question for you guys, what am I doing wrong here? I am able to enter the 5 digits in one input and I just want it to display the first character; just to test to see if it works. Afterwards I will be displaying all 5 characters like "1 2 …

Member Avatar for hfx642
0
166
Member Avatar for nchy13

hi all!! i wanted to know the name of book which covers all the basic syntax and concepts of java keeping in mind that i have the basics of c++.

Member Avatar for stevanity
0
116
Member Avatar for lorettah

<HTML> <HEAD> </HEAD> <BODY> <APPLET Code = WelcomePage.class width=300 height=300> </APPLET> </BODY> </HTML>

Member Avatar for Taywin
0
94
Member Avatar for code 117

Hi guys, hope you can help. I'm creating a mixture of an employee scheduling system with elements of a Human Resource Management System for small to medium businesses. I ideally want to create a java application with a database backend, which I'm trying to see if I can apply sql …

Member Avatar for Slimmy
0
512
Member Avatar for woodmaj

Write a program that tells you if the expression entered is a tautology or not. Assume that you have no more than three propositional symbols in your expressions -- call them P, Q, R. You must use the linked list implementation of the data structures needed. The above is my …

Member Avatar for JamesCherrill
0
534
Member Avatar for dnyansagar

Hi everyone. I have been using ubuntu for a while now. But this recent upgrade of ubuntu from 11.04 to 11.10 has caused me some problems. Mainly that some java applications are not running properly. I was using Figtree(phylogenetic tree app.) which was working fine until this upgrade. Now everytime …

Member Avatar for dnyansagar
0
221
Member Avatar for sarathsshanker

public class thermostst{ private float currenttemp(); } I thought in java only abstract classes can contain abstract methods like this! I got this from a algorithms and data structures book and im guessing its a printing mistake and currenttemp should not contain the () . Thank You

Member Avatar for JamesCherrill
0
103
Member Avatar for pikalife

So both classes are in the folder. How am I able to call variables in one class from another another class. For example, I ahve 2 classes, Class1, and Class2. So in Class1, I have "double a" and its value. How can i refer to this "double a" and its …

Member Avatar for stevanity
0
129
Member Avatar for sitajaf

Can someone pliz guide me on how to consume jax-ws web services from a gwt app. Or if one knows a good tutorial can post a link. Thanks

Member Avatar for sitajaf
0
105
Member Avatar for rajeshredy

Here is a item tablelist.Its a JCombobox.I wrote the itemlistener for it. The problem is when ever i select an item in it for the second time onwards i am unable to see the data in the listScroller in UI,but i can see the data in the console. Ewerything is …

Member Avatar for JamesCherrill
0
75
Member Avatar for corliss

Hi All, I am having a bit of an issue moving back into Java. The issue that I am having is that I am trying to call a method of a custom class that has been instantiated in my main java file from a form that is also in an …

Member Avatar for StephNicolaou
0
167
Member Avatar for pbracing33b

I am having problems with this line of code: --System.out.println(line +"is ranked at" + location + " in popularity amoung girls with" + model.getFrequencyListName(location));-- what it is telling me is that I need an int method for getFrequencyListName, and I have have one but it is for an array. Obviously …

Member Avatar for Zaad
0
182

The End.