@
@
@Qubbed2020-06-27 01:31:18
Java
@Qubbed, 2020-06-27 01:31:18

How to import a class into the Main class?

How and import a class in Main class in Java

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan, 2020-06-27
_

as well as imports into other classes.

package info.md7.java;

import java.util.Scanner;  //<< Вот тут директива импорта

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
}
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question