top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to show a user message without using printf or println or built-in methods of Java?

+2 votes
702 views
How to show a user message without using printf or println or built-in methods of Java?
posted Jul 2, 2017 by Ajay Kumar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
I guess the question should be.
How to show a user message without using printf or println or built-in methods of Java?
yes, this is correct:
How to show a user message without using printf or println or built-in methods of Java?
You can edit your questions

1 Answer

+1 vote

Following are the other possibilities

  1. System.out.write("www.queryhome.com \n".getBytes());
  2. System.out.format("%s", "www.queryhome.com \n")
  3. PrintStream myout = new PrintStream(new FileOutputStream(FileDescriptor.out));
    myout.print("www.queryhome.com \n");
  4. System.err.print("This is custom error message");

Not sure what are you looking for...

answer Jul 3, 2017 by Salil Agrawal
...