Skip to content

Мой первый проект - #1

Open
Format010 wants to merge 3 commits into
mainfrom
dev
Open

Format010 wants to merge 3 commits into
mainfrom
dev

Conversation

@Format010

Copy link
Copy Markdown
Owner

No description provided.

Comment thread src/main/java/Check.java Outdated
import java.util.Scanner;
public class Check {
Scanner sc = new Scanner(System.in);
int freandsCheck;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Наверное ты опечатался, правильно будет friendsCheck

Comment thread src/main/java/Check.java Outdated
public class Check {
Scanner sc = new Scanner(System.in);
int freandsCheck;
public int setCheck(){

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Я бы по-другому функцию назвал, например readFriendsCount

Comment thread src/main/java/Main.java Outdated
System.out.println("Введите цену на товар: ");
while (!sc.hasNextDouble()) {
System.out.println("Введите корректное число в формате 0.00 либо 0");
sc.next();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

А зачем этот sc.next(), его результат нигде не используется и по сути ты просишь ввести число, но потом не считываешь его и просто пропускаешь инпут

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants