Forum: Java Sep 29th, 2008 |
| Replies: 8 Views: 517 these are the errors i have gotten now sir ( after removing exceptions)
java.io.FileNotFoundException: t.txt (The system cannot find the file specified)
at java.io.FileInputStream.open(Native... |
Forum: Java Sep 29th, 2008 |
| Replies: 8 Views: 517 I've just attempted to move the scanner initialization to the main and i get more runtime errors. also if i did contruct an instance of program1 would that solve my issues. I really would like to... |
Forum: Java Sep 29th, 2008 |
| Replies: 8 Views: 517 import java.util.Scanner;
import java.io.*;
public class program1 {
static Scanner filescan = null;
public program1(){
try {
filescan = new Scanner (new File("t.txt"));
} catch... |
Forum: Java Sep 29th, 2008 |
| Replies: 8 Views: 517 import java.util.Scanner;
import java.io.*;
public class program1 {
Scanner filescan = null;
public program1(){
try {
filescan = new Scanner (new File("t.txt"));
} catch... |
Forum: Java Sep 25th, 2008 |
| Replies: 4 Views: 1,926 public class praogram1
{
Scanner scanner = new Scanner (new File ("t.txt"));
public static void main(String[] args)
{
}
}
ok..im tryin to define it at the class... |
Forum: Java Sep 25th, 2008 |
| Replies: 4 Views: 1,926 how do i declare a scanner object, filescan publicly so that i may use filescan in varios functions
i found this statement in a forum---->
private static Scanner scanner = new Scanner (1 3 4... |
Forum: Java Sep 14th, 2008 |
| Replies: 3 Views: 1,136 1. the reason for me doing it recursively is because its an exercise in recursion.
2. after looking at the sequence of numbers i determined that 1 was the base case.
and if the position of the ... |
Forum: Java Sep 14th, 2008 |
| Replies: 3 Views: 1,136 Im attemtping to return the next value in this suequence recursively 1, 4, 11, 34, 101
this is what i've done thus far, im not sure how to pass this list to the function to compute the next value... |
Forum: Java Sep 8th, 2008 |
| Replies: 2 Views: 1,328 |
Forum: Java Sep 7th, 2008 |
| Replies: 2 Views: 1,328 can someone help me understand what i'm doing wrong here. attempted to run, program builds but no output is generated and the compiler does'nt generate an error message.
thank you all.
... |
Forum: Java Oct 5th, 2006 |
| Replies: 2 Views: 3,527 can someone explain how i could go about applying this recursive method to a string of integers from a text file.
so far i have read the string into an int array in my main using a tokenizer and... |
Forum: Java May 3rd, 2005 |
| Replies: 1 Views: 1,874 can someone explain to me how i can go about implementing a string from a jtextfield and storing it to a file please. I would really appreciate some sample code on this one. Thank you |
Forum: Java Apr 4th, 2005 |
| Replies: 4 Views: 24,266 pause after reading user's input so that the user has a chance to read the screen before the program terminates |
Forum: Java Apr 4th, 2005 |
| Replies: 4 Views: 24,266 does java have a ' system ("PAUSE") ' like c++....if so what is the syntax to do it.
ty |
Forum: Java Mar 11th, 2005 |
| Replies: 12 Views: 3,943 For the love of god any programmer would know that was a careless mistake.
WELL FREE UR RIGHT, ANY PROGRAMMER "SHOULD KNOW"
ALSO, ANYONE WITH 5TH GRADE READING ABILITIES "SHOULD KNOW" THAT I... |
Forum: Java Mar 10th, 2005 |
| Replies: 12 Views: 3,943 Narue I got it done through a little bit of tial and error
but the concept of setting row = to matrix.length-1 is still puzzling
if u could clear this up for me i'd be very thankful.....TY
... |
Forum: Java Mar 10th, 2005 |
| Replies: 12 Views: 3,943 freesoft thats far from correct.
Narue can u explain to me why i would initialize row to matrix.length-1?
1 2 3
4 5 6
would'nt that cause my numbers to start at 5 instead of 6? |
Forum: Java Mar 10th, 2005 |
| Replies: 12 Views: 3,943 im having problems figuring out how to print this array in reverse.I believe it might be a logical issue. I don't want the answer. I'm thinkin my row must be initialized to the matrix.length. can... |
Forum: Java Mar 8th, 2005 |
| Replies: 13 Views: 14,676 can someone explain to me how i can pass the array "test" and the int "total" back to the main by reference.
public static void CalculateAverage() throws IOException
{
int[] test=new int[7];... |
Forum: Java Mar 7th, 2005 |
| Replies: 6 Views: 8,552 Ty Narue....your first guess was pretty much correct. I had skipped a line in between the data on the input file |
Forum: Java Mar 7th, 2005 |
| Replies: 6 Views: 8,552 here is the adjustments i have made to my program. I was told by my professor that it was not necessary to use an array to read in several new lines and and send the data back to an output file. ... |
Forum: Java Mar 7th, 2005 |
| Replies: 6 Views: 8,552 thank you very much for responding narrue but im still very much puzzled as to going about implementing an array into this. I just keep gettin stuck on how to create a loop on the readline section of... |
Forum: Java Mar 6th, 2005 |
| Replies: 6 Views: 8,552 currently my program only reads in the one first name and last name with 5 grades and computes the average from the first line of my input file.
eg.
Albert Lake 54 23 54 32 12 average test score 35... |
Forum: C++ Oct 27th, 2004 |
| Replies: 4 Views: 3,794 |
Forum: C++ Oct 27th, 2004 |
| Replies: 4 Views: 3,794 ty stack...i changed the values like u suggested...but im still unable to get the desired results. it should be looking like:
* * * * * *
* * * * * *
etc........but it still gives me a single... |
Forum: C++ Oct 27th, 2004 |
| Replies: 4 Views: 3,794 sup guys
im trying to implement a nested for loop for a 2 dimension array that initializes the array to the character '*'. but its just printing out garbage, i think im messing up on my syntax... |