31,001 Topics

Member Avatar for
Member Avatar for jimbob8472

hi i know this is a newb question, but how do i get doubles to display the end zeros after the decimal point for example i want to display 1.20 but i'm getting 1.2 cheers

Member Avatar for paradox814
0
154
Member Avatar for sham

I read about Java being multi-platform language but could not confirm this. If I compile and make .cla files in Windows OS and then run these on Unix OS will run fine ? Or I need to install some components.

Member Avatar for paradox814
0
112
Member Avatar for NSCelica

For homework I was assigned the "non-attacking queens" problem. Now I have all_boards as a static variable and i was trying to store each step as a board. like row 1 board, row 2 board, etc, but for some reason all the boards are overwritten with the final board. My …

Member Avatar for NSCelica
0
111
Member Avatar for jimbob8472

:o Yet another question to ask for the full assignment breif please look at [url]http://www.cems.uwe.ac.uk/~lrlang/java_html/assignment2.html[/url] it might make what i'm asking a bit clearer as i'm not very good at explaining myself. [CODE] private Booking [] bookingList; private int numberOfBookings; public Hotel () { } // Hotel () [/CODE] this …

Member Avatar for Phaelax
0
91
Member Avatar for jimbob8472

I have an assignment which can be found at [url]http://www.cems.uwe.ac.uk/~lrlang/java_html/assignment2.html[/url] i have coded all the required classes apart from Hotel and HotelGui classes my problem is with the Hotel class the assignment says "The methods that you are required to implement are as follows: * public Hotel () The constructor …

Member Avatar for jimbob8472
0
88
Member Avatar for peterb92

hello experts!!! im just a beginer.. thats wants to know alot.. i want to program my own tictactoe game.. but i dont have visual basic..can anybody plz.. give me some codes that i can edit my self with javascript or html.. if possible? can you make a tictactoe game with …

Member Avatar for peterb92
0
114
Member Avatar for drunkpanda

hi everyone System.out.println(currentPlayer); it returns to me like this:[B]Player@7cbde6[/B] i know it was caused by toString() and it is suggested to ues overriding method but i don't know how to do it, so can somebody teach me how to use overiding method so System.out.println(currentPlayer); will display what i want thank …

Member Avatar for aj.wh.ca
0
117
Member Avatar for jimbob8472

i have an assignment to write a hotel booking system in java i have to write this class "The Booking class brings together all the details for a booking into a single object. When creating a Booking object, it is vital that: * The room availability has previously been checked. …

Member Avatar for freesoft_2000
0
137
Member Avatar for SyLk

does java have a ' system ("PAUSE") ' like c++....if so what is the syntax to do it. ty

Member Avatar for freesoft_2000
0
3K
Member Avatar for higherGround574

in the past i have been able to run dos commands thru C++... for example: system("cls") in C++ used to clear the screen... does anyone know if this can be done in java?

Member Avatar for server_crash
0
178
Member Avatar for tat2dlady

I have a program that uses blocking/non-blocking direct and indirect communication. I need to have it randomly choose whether or not it should do the blocking or non-blocking method and I do not know how. Does anyone have any suggestions? Thank you.

Member Avatar for tat2dlady
0
227
Member Avatar for nabil1983

Hi all, This program below sorts arrays of integers. It counts the number of times it compares pieces of data to do the sort.With the array size set at 4 it always takes 9 comparisons. Does neone know how i can Modify it to read in a series of four …

Member Avatar for freesoft_2000
0
110
Member Avatar for tat2dlady

Does anyone know how to have a thread randomly decide if it wants to do blocking or non-blocking mode with direct communication? I am using a bounded buffer with size of 5. I have the non-blocking mode right but I am not sure how exactly to change it to accommodate …

Member Avatar for freesoft_2000
0
103
Member Avatar for kev269

Hi, I have a fileoutput method which when called, should output the array into a text file. The array is stored in the same public class as the fileoutput method and I am using a constructor for the array, which is in the Cd class. I would like to know …

Member Avatar for freesoft_2000
0
170
Member Avatar for Bud4java

Greetings all...long time reader, first time poster. I have 2 java files, one that contains methods that do conversions, the other contains a loop that allows a user to select "what" they want to convert. The program works, but one of the conversions is to multiply by 0.0092. When I …

Member Avatar for server_crash
0
175
Member Avatar for stupidenator

Hey everyone. I was just wondering what people think is the best environment for editing and compiling code. Currently, I use JCreator.

Member Avatar for freesoft_2000
0
287
Member Avatar for Ghost

Hey Everybody, I'm making a Java applet and trying to post it online. Whenever I open the HTML page where the applet is, i get an error message. Here's the website with the applet on it: [URL=http://www.inquirybio.com/quiz.html]Applet Website Link[/URL] Thanks in advanced, C++

Member Avatar for tonakai
0
197
Member Avatar for EvilObsidian

What I'm trying to do is format input from a text area so that it is all uppercase letters and numbers, eliminating all punctuatoin and whitespace. I want to use a method format() to loop through all the characters in the text and use a switch statement to determine whether …

Member Avatar for server_crash
0
308
Member Avatar for drunkpanda

recently, i bought a textbook call "Objects first with java" for self study. at the chapter 7, design a "Command Line Game" and a exercise ask me to put more functions in the game, as i do so i encounter many problems, and one of the problem as sohowing below, …

Member Avatar for stupidenator
0
335
Member Avatar for Hjcooke

This is a piece of work i need to complete for my Object Orientated programming module at university. The task, (User Input) Order Number, Name, Address line 1 and Address line 2 and select either Computer and/or printer check box. N.B. These FIVE fields must be completed by User otherwise …

Member Avatar for shakaal
0
251
Member Avatar for B33FALO

Hi everybody. I'm pretty new to java programming, just taking it as independent study my final year of high school, and I was looking for a little help. I was wondering if there was a way to have the program pause and wait for the user to tap any key …

Member Avatar for server_crash
0
7K
Member Avatar for hasan2003

Hi thanks for comming to this thread... can any one give me the idea how to use javax.swing.Icon interface?

Member Avatar for Ghost
0
113
Member Avatar for jengels

For this program, we need to read in a file which has baseball stats. Our program reads in the dat file then parses each line in the file. The file looks like this: Joe h,o,h,s,h,o,h,h,h,o,o,o Bill s,o,o,h,h,o,s,s,o So far I'm ok with this. Here is the part that I'm struggling …

Member Avatar for Phaelax
0
163
Member Avatar for nabil1983

Ok wrote this program out, compile it it compiles, when i run it it starts off nicely, but when i enter Album Name it gives me an error. Neone know where im going wrong..... import javax.swing.*; public class CdStorage { public static void main (String[] args) { String menu_choice; int …

Member Avatar for nabil1983
0
132
Member Avatar for tat2dlady

I have an assignment that I need to do that designs the necessary classes to facilitate an indirect blocking and non-blocking communication environment between threads (producers and consumers) using a bounded buffer whose size is defined at run time. I am to test the working of these classes by creating …

0
63
Member Avatar for jasweb2002

Hey everyone, Alright, my project requires that I write a program to demonstrate my understanding of class inheritance. Problem is the teacher wants us to use Java, something I have never used and the teacher did not even give us a crash course in. Right now I am trying to …

Member Avatar for paradox814
0
148
Member Avatar for Meldroz

Hey guys and gals, an int in java is 4 bytes as we all know i bet. Trying to break my into 4 bytes : int foo = 87; bytes[4] mybyte = new bytes[4]; the problem is i don't really know how to break my int into single bytes i …

Member Avatar for Meldroz
0
154
Member Avatar for server_crash

How would you put a scrolling message on your application with a seperate thread, sort of like an advertisment?

Member Avatar for jwenting
0
159
Member Avatar for stupidenator

Hey all. I am attempting to build a java applet with just a textfield and a button for a search on a web site. When the button is pushed, I have it set up to look at what the user typed into the textfield and then match it to either …

Member Avatar for stupidenator
0
104
Member Avatar for c_s_m_o_s

hi. I read a .txt file and i want to put the values from it , to an array. I have dificulties. here is the code i am using: [CODE] public void read(File afile) { FileInputStream fInpStr = null; BufferedReader bRead = null; StringTokenizer strTok = null; String line = …

Member Avatar for c_s_m_o_s
0
152

The End.