我想更多地了解LibGDX的内部世界.
例如在里面Graphics.java,我发现以下内容:
/** @return the width in pixels of the display surface */
public int getWidth ();
Run Code Online (Sandbox Code Playgroud)
但是,我找不到getWidth()方法的源代码.
我在哪里可以找到getWidth()方法源代码?
我正在用 C# 测试以下代码,它可以成功运行。我的问题是我可以在下面的例子中将一种类型的数据分配给另一种类型的数据,但为什么它仍然被称为类型安全语言?谢谢。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace Rextester
{
public class Program
{
public static void Main(string[] args)
{
var intNum = 5;
var strNum = "5";
var result = intNum + strNum;
Console.WriteLine(result);
}
}
}
Run Code Online (Sandbox Code Playgroud)
可以编译成功,结果是55。
我还是不明白self = super init; 虽然我读了很多书和谷歌.我知道它用于检查当前对象等于来自父类等的返回对象.但是,我不能接受这就是答案.有人可以给我一个简单但可靠的答案吗?谢谢!