avatar
请教低温sealant# ChemEng - 化学工程
t*z
1
为什么第一个fail,第二个通过?不就调了一下循序么,百思不解
**fail
public static void main ( String args[] ) {
int x = 50;
System.out.println("x= "+x);
{
int x= 30; //compilation fail: x is already defined in main
System.out.println("x= " + x);
}
}
**pass
public static void main ( String args[] ) {
{
int x= 30;
System.out.println("x= " + x);
}
int x = 50;
System.out.println("x= "+x);
}
avatar
Z*R
2
A Soyuz space capsule carrying two Russian crew and an American space
tourist has returned to Earth.
It landed safely in Kazakhstan at 0336GMT, and the crew reported that they
were "feeling well".
On board were Russian cosmonauts Sergei Volkov and Oleg Kononenko, as well
as American Richard Garriott.
Mr Garriott, who paid about $30m (£17m) for the 10-day trip, is
following in the footsteps of his father, who was a Nasa astronaut in the
1970s.
The flight took a new crew to the International
avatar
s*l
3
请问有没有可以常温密封剂(sealant)可以在-60C到+100C左右工作?谢谢!
avatar
m*u
4
I suspect in the second case, the x defined earlier was out of scope when
the second x is being declared, which is not true for the first case.

【在 t*****z 的大作中提到】
: 为什么第一个fail,第二个通过?不就调了一下循序么,百思不解
: **fail
: public static void main ( String args[] ) {
: int x = 50;
: System.out.println("x= "+x);
: {
: int x= 30; //compilation fail: x is already defined in main
: System.out.println("x= " + x);
: }
: }

avatar
L*O
5
100C算低温sealant么?直接联系厂家试试吧。
avatar
r*l
6
Your understanding is right.

【在 m*****u 的大作中提到】
: I suspect in the second case, the x defined earlier was out of scope when
: the second x is being declared, which is not true for the first case.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。