I'm studying Java. Is there a way to use System.out.print comfortably?

Asked 2 years ago, Updated 2 years ago, 26 views

In c++, I wrote "using namespace std" as "cout" comfortably, but is there any way?

java

2022-09-20 08:47

3 Answers

Java doesn't have a namespace (I don't know if it's in the latest version), and it's not a first-class function like JavaScript.

Add the auto-completion keyword to your IDE or editor. Eclipse has a function called Templates in its settings, and Intelligence is live Templates.


2022-09-20 08:47

I don't know exactly because I don't use Java now When I used the Eclipse IDE, I remember writing the combination of sysout + Tab.


2022-09-20 08:47

From Eclipse IDE, sout and ctrl+space


2022-09-20 08:47

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.