请解释下面的代码
public class Example{
public static void main(String[] args)
{
int i[]={9};
System.out.println("\700");
}
}
Run Code Online (Sandbox Code Playgroud)
请不要说我的八进制值应该小于377.我已经知道但是当我运行上面的程序时,我得到输出为80.我想知道它为什么会这样发生?
请说清楚.谢谢
我在考试中看到了这个代码示例问题,它完美地工作。
namespace Trials_1
{
class Program
{
static void Main(string[] args)
{
int? a = 9;
Console.Write("{0}", a);
}
}
}
Run Code Online (Sandbox Code Playgroud)
但是下面的代码会抛出错误 CS0266。
namespace Trials_1
{
class Program
{
static void Main(string[] args)
{
int? a = 9;
int b = a;
Console.Write("{0},{1}", a, b);
}
}
}
Run Code Online (Sandbox Code Playgroud)
有人可以详细解释我吗?