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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:01:28+00:00 2026-05-18T07:01:28+00:00

in the inner for loop I have 0<p1,p2,p3<3 and they are integer. I want

  • 0

in the inner for loop I have 0<p1,p2,p3<3 and they are integer. I want this for loop to assign value from 0 till 3 to each parameter in demoMethod.i.e., once the for loop executes it will send parameter like (1,2,3) to demomethod and for the second time it will send parameter (2,3,0) to the demoMethod. also the order of these three numbers are not important and they must be different .it means that after two times that for loop executes it doesn’t send parameter like (1,2,3) and (2,3,1). thanks

  public void Points(List<Point> pointList) {

    int n = pointList.size();

    if (n <= 2) {
        System.out.println("null");
    } else if (n == 3) {
        drawingLine();
    } else {

        for(int i = 0;i<n;i++){
          for(int j = 1;j<=(n-1)*(n-2)*(n-3)/6;j++){
             demoMethod(p1,p2,p3);
          }
        }
    }
}
  • 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-18T07:01:28+00:00Added an answer on May 18, 2026 at 7:01 am

    I am not entirely sure what you are trying to do, but if I understand you correctly, you want to do something like this (?):

    for(int i = 0;i<n;i++){
        for(int j = 1;j<=(n-1)*(n-2)*(n-3)/6;j++){
            int p1 =  j      % 4;
            int p2 = (j + 1) % 4;
            int p3 = (j + 2) % 4;
            demoMethod(p1,p2,p3);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two algorithms of finding primes, in Python. The inner loop of each
I have a following code in a most inner loop of my program struct
I've run into this while writing a Traveling Salesman program. For an inner loop,
If I have an inner class, like this: public class Test { public class
If I have a nested foreach loop how do I do break the inner
I have this loop while (count($arr) < 7) { $string = 'xx'; for ($i=0;
Possible Duplicate: How to Break from main/outer loop in a double/nested loop? I have
I have nested while loops with a transaction in the inner loop, e.g.: WHILE
I have an xml document which i want to pass as a parameter to
I'm writing an inner loop that needs to place struct s in contiguous storage.

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.