Skip to content

Conversation

llaobin0207
Copy link
Contributor

Java程序的基本结构练习:创建同一个类的多个对象

@hcsp-bot
Copy link
Contributor

🎉 感谢提交Pull Request!请稍等片刻,我们已经将其提交到CI进行检查,一旦有结果会立即通知您!

@hcsp-bot
Copy link
Contributor

你的提交 8d1d912 ,似乎失败了:Your tests failed on CircleCI

😅 请不要气馁,仔细分析原因,再接再厉!

@@ -16,5 +16,10 @@ public static void createTwoCats() {
// Create two new Cats named "Black" and "White"
// then assign them to "black" and "white" static variable respectively
// 在这里创建两个Cat实例,分别赋值给"black"和"white"静态变量,然后将它们的"name"成员变量分别设置为"Black"和"White"
Cat black = new Cat();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Cat black = new Cat();
black = new Cat();

@@ -16,5 +16,10 @@ public static void createTwoCats() {
// Create two new Cats named "Black" and "White"
// then assign them to "black" and "white" static variable respectively
// 在这里创建两个Cat实例,分别赋值给"black"和"white"静态变量,然后将它们的"name"成员变量分别设置为"Black"和"White"
Cat black = new Cat();
Cat white = new Cat();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Cat white = new Cat();
white = new Cat();

体会一下加和不加Cat的区别?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants