/** * Initializes a Thread. * * @param g the Thread group * @param target the object whose run() method gets called * @param name the name of the new Thread * @param stackSize the desired stack size for the new thread, or * zero to indicate that this parameter is to be ignored. * @param acc the AccessControlContext to inherit, or * AccessController.getContext() if null * @param inheritThreadLocals if {@code true}, inherit initial values for * inheritable thread-locals from the constructing thread */帮我翻译一下
时间: 2024-02-17 22:21:16 浏览: 32
/**
* 初始化一个Thread。
*
* @param g 线程所属的线程组
* @param target 要调用其run()方法的对象
* @param name 新线程的名称
* @param stackSize 新线程的期望栈大小,或者为零以指示忽略此参数。
* @param acc 要继承的AccessControlContext,如果为null则使用AccessController.getContext()
* @param inheritThreadLocals 如果为true,则从构造线程继承可继承的线程本地变量的初始值。
*/
相关问题
int a = 1; int *b; b = &a; b++;
& a;
This code declares an integer variable `a` and initializes it to 1. Then it declares a pointer variable `b` that is capable of holding the memory address of an integer variable.
The line `b = &a;` assigns the memory address of variable `a` to the pointer variable `b`. So now `b` points to the memory location where the value of `a` is stored.
In other words, `*b` would access the value stored at the memory location pointed to by `b`, which is the value of `a`.
Overall, this code sets up a way to indirectly access the value of `a` through the pointer variable `b`.
int*a=*b=NULL;
This is not a valid C++ statement.
It appears to be trying to declare two pointers, 'a' and 'b', and initialize them to NULL. However, the syntax is incorrect.
To declare a pointer variable in C++, the '*' symbol should come before the variable name, not before the value being assigned. Additionally, 'a' and 'b' should be separate variables, not dereferencing the same pointer.
Here's a corrected example that declares two separate pointer variables and initializes them to NULL:
```
int* a = NULL;
int* b = NULL;
```