相关疑难解决方法(0)

Java for循环中两个分号的含义是什么?

我正在查看AtomicInteger类内部,我遇到了以下方法:

/**
 * Atomically increments by one the current value.
 *
 * @return the previous value
 */
public final int getAndIncrement() {
    for (;;) {
        int current = get();
        int next = current + 1;
        if (compareAndSet(current, next))
            return current;
    }
}
Run Code Online (Sandbox Code Playgroud)

有人解释是什么for(;;)意思吗?

java for-loop

32
推荐指数
2
解决办法
1万
查看次数

双分号在c中意味着什么?

例如:

void thisIsAnExample(Hello* bye, char* name, int num, in* arr, int* sum){
                 GoodBye x;;
                   x.funName = name;
                    .
                    .
                    .
Run Code Online (Sandbox Code Playgroud)

c struct pointers

6
推荐指数
2
解决办法
7117
查看次数

如何在内部解析for循环

如果不写表达式,for循环如何工作.例如

int i=0 , j=1;
for(;;)
Run Code Online (Sandbox Code Playgroud)

c for-loop

-1
推荐指数
1
解决办法
88
查看次数

是什么意思"for(;;)"

Moin,我刚刚在一些源代码中找到了for循环.

for (;;) {
    // some work
    if (condition) {
       break;
    }
}
Run Code Online (Sandbox Code Playgroud)

这是怎么回事 for (;;)

c syntax for-loop

-3
推荐指数
1
解决办法
187
查看次数

标签 统计

c ×3

for-loop ×3

java ×1

pointers ×1

struct ×1

syntax ×1