I am very new at coding in Java and I want to write a code to find out my operating system through a dialogue box (Windows). I wrote this code but I am not sure how to completely implement it.
Please let me know what I am doing wrong in simple terms as I am a beginner.
import java.awt.*;
import javax.swing.*;
public class JavaTut {
public static void main(String[] args) {
JOptionPane.showMessageDialog(null,System.getProperty("os.name").list(System.out));
Toolkit.getDefaultToolkit().beep();
}
}