```c++
#include<bits/stdc++.h>
using namespace std;
int s[105];
int main()
{
int t;
int x,y,a,b;
cin>>t;
while(t--)
{
int n;
cin>>n;
int maxx=-1;
for(int i=1;i<=n;i++)
{
cin>>x>>y>>a>>b;
s[i]=abs(a-x)+abs(b-y);
maxx=max(maxx,s[i]);
}
cout<<maxx<<endl;
}
}
```代码,请勿粘贴截图
怎么用java写出来
public class Test {
public static void main(String [] args){
Scanner sc = new Scanner((System.in));
int x,y,a,b;
int t = sc.nextInt();
for (int i = 0; i < t; i++) {
int n = sc.nextInt();
int s[] = new int[n+1];
int maxx = -1;
for (int j = 1; j <= n; j++) {
x=sc.nextInt();
y=sc.nextInt();
a=sc.nextInt();
b=sc.nextInt();
s[j] = abs(a-x)+abs(b-y);
maxx = max(maxx,s[j]);
}
System.out.println(maxx);
}
}
}