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 7577367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:10:03+00:00 2026-05-30T17:10:03+00:00

Okay so the question is to read in the file and search through it

  • 0

Okay so the question is to read in the file and search through it and be able to find words with the letters you entered so for example I enter A??C all the words in the dictionary with A as the first letter and C as the fourth letter would be returned. It is supposed to be used to help solve crosswords

import java.io.*;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        NewClass reader = new NewClass();
        String[] contents = reader.load("/home/se211012/CS211/text");

        Scanner scan = new Scanner(System.in);
        System.out.println("enter word");
        String s = scan.nextLine();
        for (int i = 0; i < contents.length; i++) {

        }
    }
}

Reading in the file is fine I have a class that does that as you can see, but I don’t know where to go from here. Any help would be appreciated.

  • 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-05-30T17:10:04+00:00Added an answer on May 30, 2026 at 5:10 pm

    You should probably use a regular expression to achieve it.

    Create your regex to match the words, and search for a match through the collection.

    Note that in regular expressions, . means any character.

    You might want to hava a look on the Matcher and Pattern classes as well.

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

Sidebar

Related Questions

Okay guys, I have read through all the other posts and question on jQuery
Okay, so this is a straight math question and I read up on meta
Okay, so I'm using perl to read in a file that contains some general
Okay I've read through the plugin comments and the docs as well and I
All I need to do is a simple read from a file in the
Okay..so before you mark this is as a repeated question, read it. I've implemented
Okay, pretty straight forward JQuery question that I am struggling to find an answer
Okay so I read this post http://facebook.stackoverflow.com/questions/10373897/deleting-a-previosly-posted-article-with-opengraph-or-check-if-said-article-has but I'm using the news.reads action type.
Okay this question is very simple: I have a facebook page, and a website.
Okay guess this question looks a lot like: What is the best way to

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.