Java How to create a box around text in Java. Inside windows cmd.exe

AI Thread Summary
To create a solid box around text in Java that displays correctly in Windows cmd.exe, the discussion emphasizes the use of System.out.print() and System.out.println() without relying on symbols like dashes or underscores. The approach involves using Unicode characters that represent solid blocks or boxes. The key steps include determining the dimensions of the box based on the text length, using appropriate Unicode characters for the box's borders, and ensuring the text is centered within the box. The conversation also highlights the importance of adhering to homework guidelines, suggesting that users should demonstrate their attempts before seeking assistance.
RockHopper
Messages
1
Reaction score
0
How can I make a box around text in Java which will appear in Windows cmd.exe?

Only using System.out.print("X"); and System.out.println("X"); . It MUST be a solid box and not use symbols like - or _ .

It can also use int X , double X, char X, String X, and boolean X.



Please explain it step by step. I'm a complete noob. :-)
 
Technology news on Phys.org
RockHopper said:
How can I make a box around text in Java which will appear in Windows cmd.exe?

Only using System.out.print("X"); and System.out.println("X"); . It MUST be a solid box and not use symbols like - or _ .

It can also use int X , double X, char X, String X, and boolean X.

Please explain it step by step. I'm a complete noob. :-)

Is this a homework assignment? If so, you need to show what you've tried before we can give any help. See the rules here - https://www.physicsforums.com/showthread.php?t=414380 - especially the section titled Homework Help.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top