35,618 Topics
![]() | |
First of all, Happy new year!!! [CODE]import java.io.*; public class Main { public static void main(String[] args) { int input = 0; switch (input) { case 1: System.out.print("one "); break; case 2: System.out.print("two "); break; case 3: System.out.print("three "); break; case 4: System.out.print("four "); break; case 5: System.out.print("five "); break; … | |
Hi, Im new here and to java programming in general. I've been given an assignment to write a sorting algorithm and then test it using JUnit tests. The problem is when I try to compile the tester class i get a ".class expected" errors followed by three "; expected" errors … | |
[B]The project :[/B] Deisgn and implement an application that reads an integer value and prints the sum of all even integers between 2 and in the input value, inclusive. Print an error message if the input value is less than 2. Promt accordingly. [B]Query :[/B] I'm not sure how I … | |
Hi and I am having trouble with one of the very most basics of java applets. That is putting the applet into a webpage and in that webpage specifying some parameters. The below is my code: [CODE=html]<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" ARCHIVE="chatroom$1.class, chatroom$2.class, chatroom$3.class, chatroom.class, extender$innerclass.class, extender.class" width="500" height="480"> <PARAM name="archive" value="chatroom$1.class, chatroom$2.class, … | |
Good day! My codes stated don't have errors, it run well, BUT, though this program is saving in notepad as .out and .txt, when i closed the dos console and then run the program again, it is not reading the added items in .out and .txt file. That's the problem, … | |
Hi, I was playing around last night with having one main frame that contains several windows you can open under the window menu. For example you might have a chat window and you might have a game board window. I want these windows contained by one larger frame that represents … | |
hi everyone, i have been asked to make a basic calculator but my calc only holds two integers like 2+2 it cant do more than 2 operations so id reaaly be glad if someone could take a look at my code and see what the problem is asap.im still a … | |
First off no idea why the title doesn't say the full title, but My problem is getting snum in the main class to transfer over to the sub class, so that the snum in that class = snum from the main class The code is; [code] package workstation; import java.util.Random; … | |
I'm trying to create a game with Java, and it includes a timer, which I did with an extension of Thread. The timer is put in a loop. Effectively: [CODE] public class Game do{ System.out.println("Start"); playGameThread.start(); timerThread.start(); timerThread.join(); playGameThread.allDone = true; playGameThread.join(); System.out.println("Finish"); }while(play_again == 'Y'); } public class playGameThread … | |
First, I want to thank you for helping if you did, if not, thanks for checking it anyway. Second, I have been working on this for awhile, and I am slowly making progress. I am to make an address book, and for the most part I am getting it done … | |
Hi All, I am trying to convert HTML file into XML using java. If anyone of you have sample coding please share with me. Your suggestions greatly appreciated. Thanks, Veera | |
HI anybody can help me for the coding of user login form with two user name in notepad coding forjava application | |
I am a beginner at Java. I have been given an assignment to make a simple address book(without applets) using Java. It should have the following functions:- 1) search-by name,city. 2)add-name,telephone number,city,address. 3)modify. 4)delete. I am still working on the program.But the problem comes when the screen(black one) becomes too … | |
Hi, I'm trying to run a Java App from PHP. [B]system('java -jar /home/dave/web/drupal/java/dist/emp.jar');[/B] fails. nothing prints out, it just returns FALSE. However, this works: [B]system('java -jar');[/B] Prints out the help info normally associated with incorrect parameters passed to Java. This also works: [B]system("ls -l /home/dave/web/drupal/java/dist/emp.jar");[/B] Prints out a listing of … | |
can anyone give me a sample code of a while statement with more than one condition? please... | |
Hi everyone, Hi everyone. I'm happy to be here today. actually I need help from u . I'm doing a JAVA program and there is this error that I really tried to fix but couldn't. so can u help me please. the program I'm writing is to accept data from … | |
hi every body, i was working on my Client-server file hosting system and at this level my program can upload file from client to server but it is also expected to download the files previously uploaded. Now i can browse the filenames from the server with the following code, [code] … | |
hi, I have a requirement to include a website in my jsp file,say [url]http://www.abc.com[/url] . But the problem jsp:include does not support any protocols. how to achieve this functionality?? Thanx, lpk | |
Hi all. I'm interested in Java ME, so I downloaded Netbeans with the JDK. Here is the story: 1.) I installed the wrong version of Java JDK 2.) I removed the JDK 3.) Accidentally removed JRE as well :( 4.) JDK data still on system 7.) Downloaded and 'installed' Netbeans … | |
Hi one and all, I am using C#.net language in asp.net framework using visual studio 2008. I have one checkbox as input control and two textboxes named textbox1 and textbox2 as asp controls. First the client needs to type something in textbox1 and after that the client needs to check … | |
Im trying to make the run.bat file read the .class files from the folder classes/src. But before I didn't package my .java files and the created .class files were found in /classes. But now that I packaged my .java files, the newly created .class files are being read from inside … | |
Hi, I'm building a snakes&ladders game in java. so far i have the model ready, i'd like to make the UI in swing. my problem is to paint the dynamic board using swing, i need to paint a snake/ladder from one square to another, the problem is that so far … | |
Hello, I desperately need a good and fast image encoder and/or compressor for files like jpeg or png. I need this for [B]internet image transfer[/B]. I have to transfer an images from server to client very fast - every second, even milisecond. I'm interested in an encorder that can [I]lower … | |
I'm completely new to java and am trying to get some experience with programming java applets that can be opened from a browser. I was able to successfully open a simple "hello world" applet from a browser using the below javascript: [CODE]<script src="http://www.java.com/js/deployJava.js"></script> <script> var attributes = { code:'HelloWorld.class'} ; … | |
I get the error 'orphaned case'. So here's the problem: [IMG]http://img385.imageshack.us/img385/6424/errorqg4.png[/img] Here's my case 218 and the case before it, can you help? [code] case 192: // Use an item on an object junk = inStream.readSignedWordBigEndianA(); int UsedOnObjectID = inStream.readUnsignedWordBigEndian(); int UsedOnY = inStream.readSignedWordBigEndianA(); int ItemSlot = (inStream.readSignedWordBigEndianA() - 128); … | |
my task is to create a gui for a list of cars, bus,bicycle etc. and the program should be able to add and remove to the car in store. so i wrote this code below using netbeans IDE. [CODE]package vehicleregister; import java.awt.*; import java.awt.event.*; public class VehicleRegister extends Frame implements … | |
[CODE]/*manimbo_mp5*/ import java.io.*; public class manimbo_mp5{ public static void main (String[]args) throws IOException{ BufferedReader br=new BufferedReader (new InputStreamReader (System.in)); Integer x=8,y=1,heads=0,tails=0; String ht=""; while (x>0){ System.out.print ("Enter toss #" + y + " result: "); ht=br.readLine(); if (ht=="h"){ heads++; } else if (ht=="t"){ tails++; } x--; y++; System.out.println ("Tails: " … | |
Hello, I have to take a snapshot of my screen and send the image to a client using Datagrams. I think my problem is at the client part. The image is null, and I don't know why. Here is the server part. I tried to send 534 byte packets (bigger … | |
This is due in 2 days its supposed to be simple but i just cant get it. Write a program that will print out statistics for a user-specified number of coin tosses. First the user should be asked about the total number of coin tosses possible. For this project, the … | |
I'm am trying to send over socket a very big array - length about 1300000 .... and I use ObjectInputStream and ObjectOutputStream. The problem is when I read the input stream... I get this exception: java.io.StreamCorruptedException: invalid type code: FF at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1356) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at objectThread.run(objectThread.java:27) [CODE] //ois is the … |
The End.