32,199 Topics
| |
Problem: I need to read in each line of an input file into an aray of strings.The program should quick sort the array and output the sorted list to a file: I came out with the below code, buts its giving me two error and i need to update it … | |
I have a program that asks for a knights coordinates and prints out all possible moves. That works. What doesn't work is if it is not a legal place for the knight (i.e. off the board) it prints an error but also prints coordinates for -1,-2. not sure why. Any … | |
i have a 2d array. i know the position. how can i print it out. i just need to print out 1 single element not the entire array. | |
I am new at java. I am making an address book program. Below is a code of the Search class. Could anyone please look into it? The program is giving a problem while runtime. [code] import java.io.*; import java.util.*; class search { private String str,sval; private String arr[]=new String[8]; char … | |
ok, I have created a mobile application for a java enabled phone. I want to make the classic pong game with one paddle, and a number of blocks to break. I have managed to get the ball bouncing around the screen and off the block using a set of if … | |
I have a 2d char array and i need to find the position of a specific char in the array. what method can i use. return Arrays.binarySearch(this.matrixCopy, "S"); does not work it keeps returning -1 when there is an S in the array. | |
hello guyz,, i am really confused,,,we are about to make a program in java,,,we are making an ATM,,,however i am confused because i only have a transaction in ATm once and i dont remember much because it was 3 years ago... before i start,,i want to ask... what is in … | |
parseInt does not seem to be throwing an exception when I pass a letter of the alphabet to it. I assume this is because ASCII letters are treated as integers. So my question is, is there a method that will do this: boolean isLetter(); And if not, how do I … | |
I need a program that reads in each line of an input file into an array strings.The program should then quick sort the array and output the sorted list to a file. Please help me in this ASAP. | |
Question The problem concerns the "effective radius" of a bicycle gear. The required formula i explained below. i need to Write a program to read: the wheel radius (use a "double" as variable type); the number of teeth on the front sprocket (a "long"); the number of teeth on the … | |
I need to build a hash ADT from scratch. This means no use of any java library methods or classes. Does anyone know of any good resources that will explain how hashing works and how this info is helpful to build one? For example, how find() works, how insert() works, … | |
[QUOTE]Can anyone help me what would be the best way to transform a text file data into a trendchart... using a Jpanel! The data file would have the type of errors and the quantity that each error has appeared... Then in the Jpanel would get the trend chart composed by … | |
I working on assignment to create bank management GUI with swing. Right now I'm messing with login. Instead of using JDialog as many may suggest to use I used JFrame. [attach]8150[/attach] In case of any error messages on login attempt I wanted to display error above all previously displayed content, … | |
There are two dates (e.g. 11/11/2008 and 20/11/2008). Then how can we calculate the number of days betweeen thess two days in java. | |
I want to implement validation in my table cells. I the value does not satisfy certain condition then the focus should remain on the same cell and the user should be asked to enter valid value. I am using TableModel and i have tried implementing validation in the setValueAt() method … | |
hi i have to ceate an applciation which can tranfer files from one pc to another on the network. I want to transfer files using FTP. can anyone tell me about an open source FTP client and FTP server which i can embed in my applciation easily and use the … | |
I add integer values in combo box.When I call getSselectedItem it return object.How i convert it into integer. | |
Hi, Basically I want to simulate lots of circles bouncing off of each other in a box. My current plan is to form a grid with lots of points and give each particle a position and speed which is a multiple of the grid spacings. Then at each time move … | |
Is there any way that I can take a String and somehow use it as if its the name of one of my declared Objects? For example, if I have an Animal named germanShephard, is there some way I could say String gerSh = "germanShephard"; and then treat gerSh as … | |
I have some problem with this question: my Family class is as below: [code]import java.util.ArrayList; import java.util.Collection; import java.io.*; public class Family { private Adult father; private Adult mother; private Child[] children; private Dog ourDog; private Cats ourCat; private Rabbit ourRabbit; int Age; public Family() { } public Family(Adult father, … | |
some one pliz assist me to code the following attached problems Exercise - Using Objects This exercise will allow you to demonstrate what you have learned about objects. Develop a class to represents a human. The head, arms and legs should be properties of the human and should be represented … | |
How to make streams to read and write files (in binary) . I have found a few Streams but do not know which one to use. they are as follows:- [code] PrintStream p=new PrintStream(new FileOutputStream("myfile.text")); DataInputStream in=new DataInputStream(new FileInputStream("myfile.txt")); BufferedReader br=new BufferedReader(new FileReader("myfile.text")); Printwriter pw=new PrintWriter(new FileWriter("myfile.text")); [/code] Please tell … | |
how to write a realtime advertising program that every java enabled phone can run. | |
i have a file with 2 int's i need to assign them to a variables. the int's are separeated by a space. what method can i use to read each int separeate and then assign it to a variable. | |
Hiii I need a project on inventory control management using java... Will any one would help me out????????? | |
I need to write a program that gets inputted files from arguments written from command prompt and prints a random line from it. I don't really know how many exceptions i need and I don't really understand the logic of getting the line from the file. Please help me. | |
What is wrong with this code. when it do system.out.println(matrix[0][0] i should get 1 char i get the entire line. [code] int r =Integer.parseInt(line.substring(0)); int c = 10; String[][] matrix = new String[r][c]; while (line !=null) { for(int i =0; i< r; i++) { for (int j =0; j< c; … | |
Can someone please help me out? What are the pros and cons of C++ and Java? I've always been told that C++ is the ultimate programming language. It's powerful, fast, and used to run huge programs. But since Java is a close rival to C++, I was wondering what are … | |
I have failed my java programming class but I am retaking it in February. I have untill then to figure out how the heck to do all this. I have uploaded my program, it is an inventory program for dvds. I was supposed to create a GUI that I thought … | |
okay so i am very new to java, and my teacher is not offering much help. i have an outline of how my java program should look but i still need help!!!!!!!!!!!!!!!!!! by the way max misses is 3, and words im testing are landslide and air and fight. any … |
The End.