473,499 Members | 1,618 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

InputStreamReader help please

JavaStudent07
64 New Member
I had an assignment, on the command prompt, enter a filename of a previously formed program and print it out with numbered lines
IE*
1 public *********
2 {
3 Code
4 }

ETC.
Jan 22 '07 #1
8 1302
JavaStudent07
64 New Member
if you could just leave a piece of code, I will check it during class tommorow

THANKS,
Steve
Jan 22 '07 #2
DeMan
1,806 Top Contributor
And mark it for me?
Jan 22 '07 #3
r035198x
13,262 MVP
I had an assignment, on the command prompt, enter a filename of a previously formed program and print it out with numbered lines
IE*
1 public *********
2 {
3 Code
4 }

ETC.
Do not use InputStreamReader for this. Use a Scanner if you have jdk 1.5 or a BufferedReader and a FileReader. No one is going to write code for you if you are not willing to at least give it a try. Post some code and point out your exact problem and you will see how much help you'll start getting.
Jan 23 '07 #4
JavaStudent07
64 New Member
sorry not sure how this site goes, im a newbie...
Jan 23 '07 #5
JavaStudent07
64 New Member
by the way, my friend figured it out, it's two pages of code for that...it seems more simple but it works his way, thanks anyway...

Steve
Jan 23 '07 #6
r035198x
13,262 MVP
by the way, my friend figured it out, it's two pages of code for that...it seems more simple but it works his way, thanks anyway...

Steve
Two pages is way too much. You should not write more than 15 lines of code for this. Also now that your friend has done it for you, perhaps you did not benefit as much as you would have if you had tried it yourself and asked for help and explanations where you got stuck. If he/she used two pages for it then there is something seriously wrong with that solution.
Jan 23 '07 #7
JavaStudent07
64 New Member
lol, he got the code out of a book but alright :) I figured it was too much, I am just looking for a faster way to do it, I have no starting code.

thanks,
I will be on tommorow again,
Steve
Jan 23 '07 #8
r035198x
13,262 MVP
lol, he got the code out of a book but alright :) I figured it was too much, I am just looking for a faster way to do it, I have no starting code.

thanks,
I will be on tommorow again,
Steve
Just read about how to use a scanner to read a file then try to write this program yourself and post the code if you have any problems.
Jan 24 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2148
by: Numberwhun | last post by:
Hello everyone! I am trying to learn java and have run into kind of a snag. Here is the code that I have so far: ------ <begin_code> ---------- import javax.swing.*; import...
1
1963
by: HolaGoogle | last post by:
Hi all, Please help me with the following..it's realy urgent and i tried everything i could and i can't get it work properly!! Thanks in advance. Here's what i'm trying to accomplish: in my...
0
1961
by: s_erez | last post by:
Hi, This is a realy tricky one. I have an ASP.NET application where some pages are reading data from a DB and presenting reports. In order for the user to wait while the page is reading data from...
2
2339
by: rked | last post by:
I get nameSPAN1 is undefined when I place cursor in comments box.. <%@ LANGUAGE="VBScript" %> <% DIM ipAddress ipAddress=Request.Servervariables("REMOTE_HOST") %> <html> <head> <meta...
7
3569
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
4
3503
by: pshindle | last post by:
DB2 Team - I just downloaded and unzipped the new Fixpack 9 for DB2 ESE V8 for Windows (FP9_WR21350_ESE.exe). I then burned the unzipped Fixpack files to a CD. I proceded to install this...
1
54448
PEB
by: PEB | last post by:
POSTING GUIDELINES Please follow these guidelines when posting questions Post your question in a relevant forum Do NOT PM questions to individual experts - This is not fair on them and...
1
6417
kaleeswaran
by: kaleeswaran | last post by:
what is difference between -BufferedReader and InputStreamReader.. which one is efficent?..
1
1617
by: stmfc | last post by:
is it possible to read values from Standard input without using InputStreamReader ?
0
7132
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
5475
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3103
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
302
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.