Skip to content
Advertisement

Tag: printing

How can I print out in the “while” section of a do while loop in java?

This is my current code. I would like it to return a System.out.println(“Please enter a number above zero”) if the user enters a “0”. It currently just repeats, if the user enters 0 Currently, it checks if the user has entered a 0 and repeats. Answer Although I would add expected value in the question. On error, your recommended string

Returning a value from one method to another to be used in the output

I can’t figure out how to return the value of finalCost to the main method and have it printed. Specifically, I can’t find how to use the returned value in the “println” line. Answer You call calcMonthlyCharge(downloadLimit),but don’t store the returnvalue. When you call System.out.println(“Plan monthly cost: ” + calcMonthlyCharge(finalCost) ); It is unknown what finalcost is, this is a

Java print() not printing until println() NetBeans

I just installed NetBeans 12.6 today, and I’m having an issue with System.out.print() in the code I pasted below. For some reason, the print() in removeValue doesn’t print until the println() in the for loop in main. When I ran this code in BlueJ, everything worked fine. Is something wrong with my NetBeans or ?? Desired output would look something

Lines on printout of iText7 PDF have different length on paper

Only some of our testers report a strange look of all lines on the printout of an iText7 generated PDF (see image). The generated PDF looks perfect and the flaw only appears on paper. Most users have no issue, whatsoever. Any suggestions regarding known issues of printers, drivers or hints on how to reproduce or localize the problem would be

For loop is printing out multiple print statements

I’m making a program for class which prints out the number of vowels in a word and any help would be appreciated. Currently, the program prints out the correct number of vowels but also prints out the print statement, “vowels:” multiple times before. I’ve tried moving the print statement and the braces around but it says “error: ‘else if’ without

Array Only Prints Certain Elements and Not Others

I am currently in a Intro to Computer Language class and everyone few lessons I have to develop some minimal programs (we are given 5 different prompts and have to pick three of them to complete). Due to time, I moved on and completed a different program, but I still want to understand what is going wrong with this one.

How to cut paper after printing is done on Epson?

I have problem with cutting paper. I have Epson TM-T20 Receipt, and trying to cut paper after printing is done. I found somewhere that this is code for cutting byte[] bytes = { 27, 100, 3 }, but it’s not working. Below is code I’m using for printing. Answer Problem with this was fact that just string was sent to

Advertisement