32,199 Topics

Member Avatar for
Member Avatar for abhaydiwan

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 …

Member Avatar for VernonDozier
0
92
Member Avatar for leeba

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 …

Member Avatar for leeba
0
131
Member Avatar for mrjoli021

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.

Member Avatar for quuba
0
64
Member Avatar for shubhang

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 …

Member Avatar for shubhang
0
127
Member Avatar for Doops

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 …

Member Avatar for mjta18
0
149
Member Avatar for mrjoli021

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.

Member Avatar for stultuske
0
114
Member Avatar for l_03

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 …

Member Avatar for stultuske
0
136
Member Avatar for BestJewSinceJC

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 …

Member Avatar for ~s.o.s~
0
100
Member Avatar for abhaydiwan

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.

Member Avatar for wimper
0
125
Member Avatar for DesiFrank

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 …

Member Avatar for BestJewSinceJC
0
126
Member Avatar for BestJewSinceJC

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, …

Member Avatar for BestJewSinceJC
0
88
Member Avatar for jorgeflorencio

[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 …

Member Avatar for jorgeflorencio
0
139
Member Avatar for peter_budo

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, …

Member Avatar for peter_budo
0
139
Member Avatar for kdhanshree

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.

Member Avatar for Ezzaral
0
187
Member Avatar for SriSN

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 …

Member Avatar for Ezzaral
0
676
Member Avatar for harishasan

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 …

Member Avatar for angelfires
0
131
Member Avatar for kdhanshree

I add integer values in combo box.When I call getSselectedItem it return object.How i convert it into integer.

Member Avatar for Ezzaral
0
116
Member Avatar for coveredinflies

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 …

Member Avatar for Ezzaral
0
130
Member Avatar for BestJewSinceJC

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 …

Member Avatar for ~s.o.s~
0
197
Member Avatar for janamrob

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, …

Member Avatar for stultuske
0
213
Member Avatar for stevom

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 …

Member Avatar for stultuske
-1
114
Member Avatar for shubhang

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 …

Member Avatar for peter_budo
0
115
Member Avatar for william ndugire
Member Avatar for peter_budo
0
38
Member Avatar for mrjoli021

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.

Member Avatar for stultuske
0
86
Member Avatar for ashishforu.aec

Hiii I need a project on inventory control management using java... Will any one would help me out?????????

Member Avatar for stultuske
0
41
Member Avatar for jonjon1456

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.

Member Avatar for stultuske
0
104
Member Avatar for mrjoli021

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; …

Member Avatar for stultuske
0
85
Member Avatar for DanDaMan

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 …

Member Avatar for Rashakil Fol
0
130
Member Avatar for java-clueless

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 …

Member Avatar for javaAddict
0
95
Member Avatar for dwaynecarter

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 …

Member Avatar for ithelp
0
113

The End.