32,199 Topics
| |
Can I ask if anyone here has any guides or tutorials on how to write a simple proxy server? Simple in a sense that it can be composed of only two classes; the server and the client. It must also be able to accept requests like GET, HEAD, and POST | |
I wrote this piece of code. It is giving me an error that i cannot correct. This piece is saved the file: CE.java public class CE { private String first; private String second; private String ssn; private float rate; private float sales; public CE(String fName, String lName, String secu, float … | |
In the following codes, I only specified the user to input only 4 numbers in the textfield. I want to output the numbers inputted by the user but I don't know how to do it seeing that the "text" and "value" is different in a formattedtextfield. All I see in … | |
i want to play an audio file in java without opening a player ... like an alarm ... does any1 knows how to do this.. and r there any sample codes available online ... (please provide relevant links only) | |
| I have two problems with the focus on buttons in this project. I've pared the code down to barebones to show the problems; there are only 2 simple classes remaining & still the problems persist. It compiles, runs (java ColorView), and all that's required to see the problems is simply … |
hey guys im pretty new to java but im very eager to learn and want to make my first game :) I want a simple RPG game, but also want to make a GUI. I am using Netbeans as my IDE, do i need anything else to make a GUI? … | |
Hello, I am working on a project that requires a set of points to be sorted by their angles in relation to the x-axis. The angles, which are in radians, store their angle as a double value. My insertion sort algorithm is failing to properly sort the points based on … | |
[CODE]import javax.swing.JOptionPane; import java.util.Random; public class guess2 { public static void main(String[]args) { int num; int guess; int diff; String input; int Diff; Random randomNumbers=new Random(); guess=randomNumbers.nextInt(100); diff= num - guess; Diff=Math.abs(diff); input=JOptionPane.showInputDialog("Enter your guess."); num=Integer.parseInt(input); for(int i=0; i<5;i++) { while(num<0 || num>100) { input=JOptionPane.showInputDialog("Invalid number!Please re-enter: "); num=Integer.parseInt(input); if(Diff==0) … | |
why my executable jar file created in Netbeans cant write/output a .txt file. . .my program must create a text file and write with it, how can it doesn't work when i convert it to .jar but if i run it in netbeans it work fine?.. | |
hey guys. i'm having trouble with looping a program. my assignment is to get the user to input a string and then display it backwards. i've successfully done this, but it's supposed to ask if you want to run the program again, and that's where my program fails. [CODE]public class … | |
When I was using Python I created a program using basic knowledge of object orientation to compare between different cars. now when i switch to java I come up with a plan to compare lines I have created a point class and get the lines as well but now i … | |
Hi.I am trying to slice a byte array such that the output must have the required bytes from given location of the byte array.Also I am looking for appending bytes to a byte array.Please help me.References would be accepted.Thanks. | |
Hello, I am using a Jtable in my application.I am entering values in last column of that table.Below the table, i have a Jbutton named as 'Save'.Suppose while clicking on 'Save', the entire row remains selected except the last cell in which I have entered the value.Then if I retrieve … | |
Hello, I have to create a product class that holds the item number, product name, units in stock, and the unit price. I also have to create a java application that displays the same info. I have been working on this for three days now... I am getting frustrated because … | |
Okay, so I am taking an intro class for java programming and my instructions for this program were to write a program that found the first 20 numbers that when divided by 2,3,4,5,6 all left a reminder of one and then when divided by 7, left a reminder of 0. … | |
I have a project with these requirements: > Create an array based phone directory which can load name and numbers of all the poeple in the phone book (which is an array) and can change numbers of existing entries, add new entries, delete existing entries and save any new changes … | |
Hi! I need help with a class project. It is basically an encoder/decoder program, with two parts. Part 1: Take text entered by a user, convert each character to a number, and save the result to a file. Part 2: Read each number from the file, convert it to a … | |
Can any one please give some links about Form Validation through java script. Or if any one can assign me some assignment related to JSP,thn please reply this post. I need to know that practically how and where JSP is used except form validation. Thanks for your time. Regards, | |
Is it safe to assume that any object that is preceded with the letter 'J' is a member of the Swing package? Just trying to get lightweight versus heavyweight components sorted properly. Thanks. -- Curtis | |
hello, I am using byte array to store values in it & then i am storing that byte array into database using [code] st.setBytes(1,myBytearray); [/code] while retreiving values it works fine if last byte value is not zero. But if it is zero, i think,last value is not getting saved … | |
would anyone explain the difference among "public static int " and "public final int " and "public static final int" ? thanks | |
Hey pal, It would be great if you give your suggestions and ideas on Java script Tile base game engine. You know.. with click to walk (or keyboard), inventory, grab items, talk to people, exp, levels, etc. Any Good Ways, any help would be appreciated. Thanks, Eric Paul | |
Hi, everyone! I wish i could find someone who is diligent in answering to my queries since i am a beginner when it talks about java. I understand visual basic very well since it was the language i used when i am doing my thesis, and now i am working, … | |
I had learned that JVM will collect only the freed memory location during the garbage collection..That is if an object had a reference, then it will not be collected... My doubt is, will the JVM collect all the used location whenever it goes out of the method..That is . [ICODE] … | |
Hi all The program i'm trying to write is meant to take a series of HTML codes as input and check to see if the all the tags in that code are matched or not (it should basically check all the opening tags and see if they have been closed) … | |
Does anybody know how to indent in the java code and then once then one you run the application the output is displayed with the indentation you created. Anyone's input in this would be helpful. | |
Hello People Please suggest me the use of passing class reference in a method Here is the sample code from class A [code]public Integer[] getReport(Class classname, String sql) {[/code] And, then when it is called inside class C, it is referred to as , [code]new A().getReport(B.class, "select * from Table … | |
hi, i just have many questions regarding abstract class, please briefly explain if you may. thanks. 1. what is the difference between declaring public abstract class and abstract class ? 2. should abstract class have a constructor? i know by default it has one, but since abstract class doesn't have … | |
A computer program is to be developed to be used in clocks. Here is a class definition for this program public class Time { public int hour; public int minute; public boolean isMorning; } Enhance the above class definition by providing two constructors: one that allows a time to be … | |
HI! i need to create a program that lets user input as many numeric grades as they like.... in return they get the letter grade for each and the their grade average, minimum, and maximum. this is all i have so far...... import TerminalIO.KeyboardReader; public class LetterGradeWLT { public static … |
The End.