⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 auto_type_conversion.java

📁 JAVA程序设计课程中各章节的程序实例。
💻 JAVA
字号:
//Automatic type conversion applying to method overloading
class Demo
{
	void test()
	{
		System.out.println("No parameters");
	}
	
	void test(int a, int b)
	{
		System.out.println("a and b:" +a + " " + b);
	}

	void test(double a)
	{
		System.out.println("a: (double)a " + " " +a);
	}
}

class Auto_type_conversion
{
	public static void main(String args[])
	{
		Demo ob = new Demo();
		int i = 88;

		ob.test();
		ob.test(10,20);
		ob.test(i);
		ob.test(123.2);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -