32,204 Topics
| |
i really need help with this error. it is an unexpected types error [CODE]public class ticTacToeDemo { //use a 3X3 array for the game board. private static char[][] board = new char[3][3]; public static void main(String[] args) { int turnNumber = 0; System.out.println(board[1][1]); newGame(); while(!winner()) { turnNumber += 1; if … | |
Hi.. :?: I have written a program that reads a file and loads it into the 2D matrix but the problem is that it only loads the first line into 2D Matrix and duplicates the same. Can somebody point out the mistake. Here is my input file[CODE]14 12 5 4 … | |
i am trying to create a program that will enable me play the hangman game and I am not meant to use arrays. What should I do and how do I go about this. you get 5 tries and when your tries are all used you lose and then a … | |
Hello guys... I'm trying to develop an application with a GUI that sends and receives data via http, by sending a url via POST and eading the content generated by the url. or instance, if i send a nick and order number, the server generates a SessionID via html. My … | |
I am trying to draw stars/asterisks but i can't. Any idea? [CODE] import java.io.*; import java.awt.*; import javax.swing.JPanel; import javax.swing.*; public class kmd1234 extends JFrame{ kmd1234(){ JFrame f; JPanel p; JLabel l; int x,y; f = new JFrame("my frame"); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); p = new JPanel(); p.setPreferredSize(new Dimension(512, 512)); p.setBackground(Color.WHITE); l = … | |
Hi, I have a Entity Bean and A session bean facade. My Client side look up works fine and I am able to retrieve the .count() method results. But when things involve serialization, like .create() or delete() or edit(), java.lang.reflect.UndeclaredThrowableException comes up.. Any pointers will be appreciated [CODE] package eb1; … | |
Yes I am new to learning java. I am just learning loops. For my online college class I have to write a program using the for loops. This program needs to give all even numbers between 0-100. I have a program written that gives me all numbers 1-100. Can anyone … | |
I have a JInternalFrame painted with a BufferedImage and contained in the DesktopPane of a JFrame.I also have a JTextArea where i want to write some java code (function) that takes the current JInternalFrame painted BufferedImage as an input and after doing some manipulation on this input it returns another … | |
I'm making a rock paper scissor game in java mobile application. I am having a hard time coding on how to get a random value to output a certain message. And how do I produce a whole number? Not the decimal ones that. Thanks for the reply. [CODE]import java.util.*; import … | |
Hi im still quite a terrible programmer, so some of this is just confirmation of stuff i think is right (and please correct me if i have the wrong idea!) How would you program an anogram maker ? I was thinking of breaking up a String with substring, and then … | |
Hi Everybody I am trying to play a MPEG4 Video in JMF over a HTTP server. I tried to write an applet to play this mpeg4 video over HTTP using javax.media package. So, can anyone tell me any solution for this problem? regards Jyotirmoy | |
So, I am working on a project that uses inheritance. I have a class Creature, which extends Thing. Also, I have classes Tiger and Ant that extend creature. I also have a TestCreature class. All of these are in the same directory, and they all compile. However, when I run … | |
I would like to send code along with my form to re-map a couple of keys. Specifically ... Right arrow key to act like TAB Left arrow key to act like Shift+TAB Is this possible please? | |
Hello, I am trying output number of repetion from user request. So basically there will be repetition print out of the times table when the user enter in the "Enter repetition" dialogbox. For example in the "Enter repetition" dialogbox, i will enter 2, then in "Which timestable do you want" … | |
Hey Everyone! I am writing a program for students and to keep it platform independent I have chosen to convert it to Java. Now, earlier I was using C# and with MS Visual Studio, I was able to write a plugin which would save all open ms office documents. I … | |
Greetings! I'm almost finished in creating a geometry wars like game (except that you cant move =P ). For the last few days I've been stuck doing the diagonal movement of the bullets. I wish someone could help me =D here's the constructor of the bullet class x & y … | |
Hi all, I thought it would be quicker to design using NetBeans, but now I'm finding that it's more trouble to work with NetBeans automatically generated garbage 'code'. Anyhow, I've tried to remove its automatically generated code for the frame's scrollbar but that just totally messes up the layout of … | |
Output: Enter name: Ferrial P. Esber A - 1 B - 1 E - 2 F - 1 I - 1 L - 1 P - 1 R - 3 S - 1 Space - 2 Please reply ASAP, thank you very much | |
Hi guys I need help with my project I want to write a java code that determine if an expression is tautology or not e.g. P v Q -> R note that: v is or -> is implies i need a help how to start? do i need a truth … | |
hi i wonder if any one can help i have to write a program in java were there is a server and client, what has to be done is that a number is entered on the clients side, which then goes to the server and if the number matches then … | |
hi, I am creating a mobile application, where I want to fetch a set of data from the database and put it in the xml file dynamically and then display it in the mobile console, so tat i don need to fetch the data from the database again and again,I … | |
Hello, i have to create a java program that calculates a polynomial, kinda. the key question i have is i dont understand what this is asking me right here, and if i am understanding it right, why is it not working? this is what it is asking me Create a … | |
Hey Everyone... Not quite sure how it works on these forums as this is my first post, but I am looking to separate elements of lines printed to a text file in real-time for a log parser. An example of the text output is: [INDENT][CHAT WINDOW TEXT] [Sun Nov 29 … | |
I am attempting to initialize an int[] array of 10 random numbers. Then choose a pivot value from the array. I then place this value in the first position of the array. Then call quicksort on the array, which will call a partition method. This method returns the final index … | |
I have this code: [CODE] public static int pow (int x, int n) { if (n==0) return 1; int t = pow (x, n/2); if (n%2 == 0) { return t*t; } else { return t*t*x; } } public static void main(String[] args) { System.out.println (pow (5, 2)); } [/CODE] … | |
I have two text files which are similar but with different tags: File 1: [code] Ben|2 Jen|4 Harry|8 Bill|3 Jack|2 Jill|2 Rip|1 P|1 A|3 B|4 C|2 G|5 Tom|1 Harr|4 Red|4 Green|2 Red|3 Blue|4 Lent|4 Burrow|2 [/code] File 2: [code] Ben|2 Jen|5 Harry|2 Bill|4 Jack|3 Jill|6 Rip|1 P|2 A|19 B|0 C|1 … | |
Hi, I`m making a temperature program, the program takes the temperature F and prints the equivalent Celcius temperature. and VS. The temperature is a double, but I get too many numbers after the decimal poit, like( 45.67777777...) I`d like to set it to only one or two numbers after the … | |
Hello everyone, I am writing a simple program for homework that processes the users income taxes. Part of the assignment is to allow the user to process a second user if they desire. My problem is that when the user elects to go ahead with round number two. The program … | |
I've created a simple GUI that's purpose is to square or cube a given number that the user enters into the textfield. This all works fine but what I now want to do is to fine-tune it by testing the input. For example if the user enters a non-numerical value … | |
Hi how can i get linux distributions name in java ??? i try it by Syatem.getProperty("os.name") but this return only "Linux" !!! is any way to return like fedora , suse , ... ??? thanks |
The End.