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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:12:34+00:00 2026-06-01T05:12:34+00:00

I am an eighth grader on a mission to create an application in Java

  • 0

I am an eighth grader on a mission to create an application in Java that finds the point where two virtual lines meet, given the slope and y-intercept of the two lines. As it stands right now, I have two arrays (both with long values) that store the y values for the given x values (x = 0, 1, 2, etc). Now I need to figure out how to create a for each block (you know, the one with the colon in it) to check if the y value in the first array is equal to its counterpart in the other array. How do I do this?

  • 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-01T05:12:35+00:00Added an answer on June 1, 2026 at 5:12 am

    As you have two arrays, you should probably use a normal loop, and not a for-each loop. Something like:

    // assuming both arrays are of the same size
    for (int i = 0; i < firstArr.length; ++i) {
        if (firstArr[i] == secondArr[i]) {
            // match found
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am an eighth grader with a tight deadline on a java project. I
I am working on a small application that plays back eight different .5 second
I use a desktop with eight cores to build a Java application using Ant
I have a data set that is around 700 rows with eight columns of
I have an IntelliJ project with eight modules and roughly 500 KLines of Java.
So I've been using Erlang for the last eight hours, and I've spent two
Newbie problem: I have a SQL SP with ten parameters (eight input, two output)
I want to generate eight bit (uint8_t) random numbers so that I exclude a
I am creating a page that allows users access to a certain section of
I have a SQL Server table that contains postal addresses. In preparation for mailing,

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.