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

  • Home
  • SEARCH
  • 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 5844647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:19:22+00:00 2026-05-22T12:19:22+00:00

Following is a static struct in C++. How can this be represented in java.

  • 0

Following is a static struct in C++. How can this be represented in java.

static struct {
       int c1;
       int c2;
   } pair[37]= {{3770,3780}, {3770,3781}, {3770,3782}, {3770,3785},
                {3770,3786}, {3770,3787}, {3771,3780}, {3771,3781},
                {3771,3782}, {3771,3785}, {3771,3786}, {3771,3787},
                {3772,3780}, {3772,3783}, {3773,3780}, {3773,3781},
                {3773,3782}, {3773,3785}, {3773,3786}, {3773,3787},
                {3774,3780}, {3774,3781}, {3774,3782}, {3774,3783},
                {3774,3785}, {3774,3786}, {3774,3787}, {3776,3780},
                {3776,3785}, {3776,3786}, {3776,3787}, {53,3770},
                {53,3771},{53,3772},{53,3773},{53,3774},{53,3776}};

Thanks

  • 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-22T12:19:23+00:00Added an answer on May 22, 2026 at 12:19 pm

    In java you could make a collection/array of Pair objects or use an multidimensional array (array of arrays);

    static int[][] pairs = new int[][] { {3770,3780}, {3770,3781}, {3770,3782}, {3770,3785} }
    

    or

    class Pair { 
      int a; 
      int b; 
      Pair(int a, int b) { this.a=a; this.b=b; } 
    }
    
    static Pair[] pairs = new Pair[] { new Pair(1,2), new Pair(2,3) ..... }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have the following method: public static int CountNonNullMembers<T>(this IEnumerable<T> enumerable) {
Say I have the following class: template<class T> struct A { static int value;
Setup Given this user-defined type: struct T { static int x; int y; T()
Modern C++ Design gives the following example: template <class T> struct EnsureNotNull { static
When compiling this code I get the following error : In function 'int main()':
From various sources on teh interwebs I've gleaned this following function: public static Nullable<T>
I have the following structure: private struct S_indiv { public int[] x; public int
I have the following struct for a linked list: struct Node { int type;
The Daily WTF for 2008-11-28 pillories the following code: static char *nice_num(long n) {
Consider the following code: private static void WriteProcesses(StreamWriter sw, DateTime d) { sw.WriteLine(List of

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.