Questions tagged [system.out]

Predefined stream object attached to the standard output in Java console applications.

It's a static variable in Java's System class. This tag is intended for questions about Java applications that write to the standard output.

404 questions
-2
votes
1 answer

java swing it doesn't without system.out.println

Hello so i started learning java a week back and i basically started making a gui just to see how things work and i found a weird "bug" or i don't exactly understand how things work and it's not even a bug i have a class called startPanel that makes…
billzg
  • 3
  • 2
-2
votes
2 answers

System.out.Println to JTextArea in Java

Good Evening, I am new to GUI in Java. I have the following code : public class FrameENN extends JFrame { JButton b1; JTextArea t1; JLabel l1; String c; eHandler handler = new eHandler(); public FrameENN(String s) { super(s); setLayout(new…
-2
votes
1 answer

arrays print out method java

I try to write a program that displays the values of an array and that is composed of 2 classes. One of these classes contains a method that uses System.out.print in a loop: public class methodsForArray{ int numbers[]; public void…
Karl
  • 63
  • 6
-2
votes
1 answer

Java: Encryption Issue

I wrote a program to encrypt and decrypt Strings and am having a small issue with it... Code: public static void main(String[] args) { System.out.println("Welcome the small-scale RSA Testing Tool!"); …
Becca Bohem
  • 139
  • 1
  • 2
  • 8
-2
votes
1 answer

Execution blocks because of using System.out.println() in logging inside a for loop?

Today we were struggling in a situation when execution blocked ("blocked" - this should be more technical word but at this point i can't figure out) in Java EE project in JBoss EAP alpha version and after sometime there were no more console…
AsSiDe
  • 1,826
  • 2
  • 15
  • 24
-2
votes
1 answer

Why does java ignore the first part of the print statement when concatenated with a boolean statement?

Suppose I have this code public class Test{ public static void main (String args[]) { String s = "thrones"; System.out.println("Game of" + "thrones" == s) ; } } The output of the above code block is just 'false' But…
shashank
  • 47
  • 1
  • 8
-2
votes
3 answers

Algorithm output to length starts new line

I am trying to format the output from what I have written to display a list of primes (Eratosthenes) to a certain number results per line. Do they need to placed into an Array to accomplish this? I have not come across a way to implement their…
Austin
  • 195
  • 1
  • 4
  • 13
-2
votes
3 answers

displaying Java double value

here's a piece of Java code: import java.util.*; public class javaTests { public static void main(String[] args) { double decimal = 0.60; System.out.println(decimal); } } I'm trying to print 0.60, but the compiler…
-2
votes
1 answer

Not going in for loop

I have the following code ArrayList Analysis = new ArrayList<>(); ArrayList designInitialBuild = new ArrayList<>(); ArrayList Production = new ArrayList<>(); ArrayList Strategy = new…
-2
votes
2 answers

How System.out.println works?

I have the following code: Integer b = 4; System.out.println(b+++10); Why does System.out.println evaluate that expression? If you look at Java's source code you will not find the code that evaluates this expression. Also, why does b+++ work?…
BenMansourNizar
  • 1,558
  • 4
  • 21
  • 42
-2
votes
1 answer

regarding explanation of statement System.out.println();

i want to know what each term in System.out.println() means?
Surya
  • 23
  • 1
  • 3
-3
votes
2 answers

Add in System.out::print , i am not able to understand it

map.values().stream().distinct().forEach(System.out::print); I am not able to add comma in the above code for adding a comma between the values of the hashtable
Shiga S
  • 11
  • 1
-3
votes
1 answer

What does System.out.format("height is %3.1f percent greater than length\n", percentage); do in Java?

I have a variable called -- double percentage and I wanted to print it using System.out.format("height is %3.1f percent of the length\n",percentage); When I don't enter a value for the height it returns this NaN percent of the length. What does…
Jim6834
  • 1
  • 4
-3
votes
1 answer

Determine if the name is a Short name, average length name, or a long name

I am trying to write an if/else statement as I think that would be my best way. What I need it to do is determine if the name is a Short name, average length name, or a long name. Now with 13 being the average length that would mean I would need to…
-3
votes
2 answers

Why is System.out.println not giving any output?

I wrote a simple java program but it isn't giving any output. It just has to take array input and then print it but on running the program it doesn't produce any output and it is also consuming 60 MB of memory. import java.util.*; public class…
1 2 3
26
27