我正在检查不同的RGB格式,我想知道为什么在RGB-565到绿色分配6位和红色和蓝色5?绿色背后是否有任何特殊原因,或者它只是一种美学选择.因为有3种颜色,格式由2个字节表示,数字565看起来更加对称,然后是655或556.
HTTP请求的最小字节数是多少?我的意思是HTTP请求应包含的强制数据的大小,例如标头的相关字段,并考虑到请求的主体是空的.
如何在两个不同的类中使用getter setter
Class A{
int a = 10;
GetterAndSetter gs = new GetterAndSetter();
gs.setValue(a);
}
Class GetterAndSetter {
int a ;
public void setValue(int a){
this.a = a;
}
public int getValue(){
return a;
}
}
class B {
int c;
GetterAndSetter gs = new GetterAndSetter();
c = gs.getValue();
}
Run Code Online (Sandbox Code Playgroud)
打印时,它给出null.并告诉我它是否有效.