class Solution {
public int[] twoSum(int[] nums, int target)
int k=0;
int[] d=new int[2];
a:for(int i=k;i<nums.length-1;i++)
{
b:for(int j=k+1;j<nums.length;j++)
{
if(nums[i]+nums[j]==target)
{
d[0]=i;
d[1]=j;
}
}
k++;
}
return d;
}
}
class Add
{
public static void main(String[] args)
{
int[] a={2,7,11,15};
Solution b=new Solution();
int[] c=b.twoSum(a,17);
System.out.print("["+c[0]+","+c[1]+"]");
}
}