Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8694261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:44:40+00:00 2026-06-13T00:44:40+00:00

For an assignment I’m coding, we have to include print statements that tell us

  • 0

For an assignment I’m coding, we have to include print statements that tell us what file is being worked on. However, all that is passed in the methods that is in anyway related to the file is the FileReader.

The file names are taken from string args in the main method, this method then creates the file reader and passes it to the methods. Rules of the assignment mean we are not able to edit the main methods, or our method headers.

So my question is is there a way to backtrack through a file reader to get a string name?

EDIT: Talked to the lecturer, he said to; ‘use the string arguments’, the ones that are only passed to the readers and writers.

EDIT2: Lecturer messed up, ended up allowing us to edit the main methods.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:44:42+00:00Added an answer on June 13, 2026 at 12:44 am

    I’d write another class with it’s own static void main(String[]). The method would capture and print the arguments then call the original main() method. Technically that doesn’t violate the rules.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My assignment requires that I have an ER diagram that shows the dependencies between
[Assignment] Requirement Use specifically OutputStream subclasses to output data to a .txt file, that
I have an assignment in which I need to create a function that tells
I have an assignment, and I'm trying to read a file and count how
For my current assignment, I have to use the following header file, #ifndef STACK_H
I have this primer assignment that I have to run inside a Linux VM
My assignment is to write an overloaded version of iquote() , a method that
Subscripted assignment dimension mismatch.' when running a linprog coding. My code is for M
My assignment is to create a simple graph that has both Nodes and Edges.
My assignment was to write a Java class that creates an array of integers,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.