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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:16:32+00:00 2026-06-10T16:16:32+00:00

I learned this piece of code in University, while learning C++.. and I later

  • 0

I learned this piece of code in University, while learning C++.. and I later used the same thing in C#… but now I want to use it in Java… I have looked all over Internet for similar thing, but i dun even no how to phrase it so i get the correct results.

So umm please let me know how to do this is in JAVA and also let me know what is this way called??? I know What it does.. but i have no idea how it does it.. so mind explaining it as well…

C++ is the same thing as below except one DIFFERENCE look Below

C# if (Customers[i].delExecute(delIn) == true)

C++ if (Customers[i]->delExecute(delIn) == true)

Java ?? if (????????????????????????????????)

So here I go ill try my best to explain.
C#

Class called Customer with custId etc etc

List<Customer> Customers = new List<Customers>

    public void delCust(int delIn)
    {
        for (int i = 0; i < Customers.Count(); i++)
        {
            if (Customers[i].delExecute(delIn) == true)
            {
                Customers.Remove(Customers[i]);
                break;
            }
        }
    }

bool delExecute(int delInput) {
    if (custId == delInput) {
        return true;
    }
    return false;
}

OK right so the above code works

now I want the same thing with JAVA… anyone got any ideas how?

  • 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-10T16:16:33+00:00Added an answer on June 10, 2026 at 4:16 pm
    if (Customers.get(i).delExecute(delIn))
    

    BTW, there is no need to say == true explicitly

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

Sidebar

Related Questions

per my question Aes Encryption... missing an important piece , I have now learned
I learned about this: desc survey.bb_data through SO, but this only tells you what
Similar to this question, but for VB.NET since I learned this is a language
I have always written regexes like this <A HREF=([^]*) TARGET=_blank>([^<]*)</A> but I just learned
I have learned this method of passing values with addEventLister. Here is the code:
I have never learned this aspect of programming, but is there a way to
As I just learned from this question , .NET regexes can access individual matches
I recently asked about functional programs having no side effects, and learned what this
I just learned about ThreadLocal this morning. I read that it should always be
From this question I learned Double.NaN is not equal to itself. I was verifying

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.