Write a program that displays "It's not a bug - it's a feature."
Example output: It's not a bug - it's a feature.
Requirements:
The program should output text.
The text should begin with "It's not a bug".
The text must end with a period.
The text should consist of 32 characters, including spaces and punctuation marks.
The displayed text must match the task conditions.
package com.codegym.task.task01.task0106;
/*
Bugs and features
*/
public class Solution {
public static void main(String[] args) {
system.out.println("Its not a bug - it's a feature")
}
}
Hello Chinmay,
1) Like Jobin John said, all command should end with a semi-colon. So end your "System.out" command with a semi-colon.
2) Since Java is a case-sensitive language "system.out" is not the same as "System.out". So make sure you type it correctly.
3) We are not taking an English grammar course here. So I think we don't need to worry about the actual text that we have to display. Simply copy it from the instructions and put it in the double quotes inside "System.out" command. That would do to match the displayed text to the task.
Good luck.
Dear friend,
A few reminders about the Java language. It is a statically and strongly typed language. There are certain rules we need to follow when we use the language. Java doesn't like it when people do not follow it.
I will try to point out some of these relevant to the task at hand.
1.) All statements in Java "MUST" end with a semi-colon(";"). This is to simply help the compiler understand where one statement ends and the other begins.
2.) There is an unsaid rule regarding naming stuff in Java. For classes, we basically use "camel case" when naming it. It simply means that the first letter of the class name has to be in upper case(capital) followed by lowercase letters. This is vastly followed.
Now, this is important because, in Java, to perform various tasks, we use existing classes instead of writing everything from scratch. And the people who write these classes, follow this naming rules. Point is, in the statement in the example:
System.out.println();
Here, the first word 'System' is a class. For simplicity, we will ignore the significance of 'out' for now. So basically with this statement, you are calling the println() method from the 'System' class. So as per the rule, the creators of the class named it "System".
Java, being case sensitive, will not recognize the class if you call it anything else.
So, there you have it. The long answer to this particular wall that you have hit.
FYI, could've said this in one sentence, but you might forget it. Happy Coding!!!
package com.codegym.task.task01.task0106;
/*
Bugs and features
*/
public class Solution {
public static void main(String[] args) {
System.out.print("It's not a bug-it's a feature.");
}
}