📄 testcircle.java
字号:
// TestCircle.java: Demonstrate creating and using an object
public class TestCircle
{
// Main method
public static void main(String[] args)
{
Circle myCircle = new Circle(); // Create a Circle object
System.out.println("The area of the circle of radius "
+ myCircle.radius + " is " + myCircle.findArea());
}
}
/*
// Define a circle
class Circle
{
double radius = 1.0;
// Find the area of this circle
double findArea()
{
return radius*radius*3.14159;
}
} */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -