File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Core Java Question

 
Sailendra Jena
Greenhorn
Posts: 9
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anyone help me how to print a String in console without using System.out.println() in java?
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sailendra Jena wrote:Hi,

Can anyone help me how to print a String in console without using System.out.println() in java?


Why do you not want to use System.out.println? Is this an interview question or a school test? Are there other constraints?

I would suggest looking at the docs for the System class and the PrintStream class to start with.
 
Sailendra Jena
Greenhorn
Posts: 9
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeff Verdegan wrote:
Sailendra Jena wrote:Hi,

Can anyone help me how to print a String in console without using System.out.println() in java?


Why do you not want to use System.out.println? Is this an interview question or a school test? Are there other constraints?

I would suggest looking at the docs for the System class and the PrintStream class to start with.



Hi Jeff,

This is an interview question thats why i am asking this question. Whatever you mentioned that is also not correct way to print the String without using System.out.println(). Without using print related method but i want to print any statement. I am not telling you that i am not using this System.out.println(); i am using this but i want to know that is there any other code available which can print the statement without using System.out.println() method.

Thanks & Regards
Sailendra Narayan Jena
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Personally I think it's a ridiculous question. There is no one right answer, and it has no real-world applicability whatsoever. The interviewer may have thought he was being clever and trying to get you to think outside the box, but this question doesn't really test that at all. And I bet he's looking for one specific answer, and there's no way you could know that without knowing what constraints and assumptions he has in mind.

If answering this question correctly helps somebody get a job, I don't want to read that person's code, or use that company's products.
 
Mansukhdeep Thind
Ranch Hand
Posts: 1158
Eclipse IDE Firefox Browser Java
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeff Verdegan wrote: If answering this question correctly helps somebody get a job, I don't want to read that person's code, or use that company's products.


Just another example that very Tom, dick and Harry gets to be the interviewer in India's IT industry. Even people who think that they are smart when, in reality , it is quite the opposite. That is one thing I have learned about taking interviews - Never take it for granted that the interviewer will be better than you at what he's supposed to test you for. Many a times they are. But on and off I keep on encountering fools.
 
Ivan Jozsef Balazs
Rancher
Posts: 972
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> Without using print related method but i want to print any statement.

I must admit not to quite understand this.

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic