Ask coding questions

← Back to all posts
Is there a shortcut I can use for system.out.println(); in java?
AshishKaripalli (1)

I dont' want to type out system.out.println(); every time I need to use it.


i guess you could make a function called p or print, and in that function, put system.out.println();. When you want to print, use print.

IntellectualGuy (854)

Hello, you could make a method and use it whenever you want to print it like so

public static void print(String text) {

or there is

public static void print(String text) {
   // Notice that in the first method it's println and in this one it's print

If you wanted to do print instead of println. doesn't have this feature but if you use eclipse java (Details on how to download that here), then type sysout and then ctrl + space.

programmeruser (615)
void print(String data) {
EpicGamer007 (1755)

@programmeruser even better:

public static void println(String data) {

public static void print(String data) {
TsunamiOrSumth (539)

make a function called print and make it just do that?