Advertisement
sergAccount

Untitled

Dec 19th, 2020
525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.53 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package ja11;
  7.  
  8. import javax.swing.JOptionPane;
  9.  
  10. public class JA11 {
  11.     //    
  12.     public static void main(String[] args) {
  13.         // TODO code application logic here
  14.         // имя_класса.имя_метода - для вывзова метода с модификатором static
  15.         double res = MathUtil.calcRectArea(10, 200);
  16.         System.out.println("res=" + res);
  17.         // JOptionPane - имя класса
  18.         // showMessageDialog - статический метод для вывода сообщения
  19.         //JOptionPane.showMessageDialog(null, "HELLO JAVA!!!!!!!!!!!!!!!!!!!!!!!!!");        
  20.         //JOptionPane.showMessageDialog(null, "Привет мир!");                
  21.         //JOptionPane.showMessageDialog(null, "Площадь прямоугольника=" + res);        
  22.         // JOptionPane - имя класса
  23.         // showInputDialog - статический метод для вывода сообщения и ввода информации в виде строки        
  24.         String result = JOptionPane.showInputDialog(null, "Введите значение!!!!", "Имя пользователя!!!!", 1);
  25.         // result - значение полученное с помощью данного диалога
  26.         System.out.println("result=" + result);
  27.     }    
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement