Java - Assign value to variable and output its value

Description

Assign value to variable and output its value

Demo

public class Mysecondjava {

     public static void main(String[] args) {
          double num3 = 190.33;
          System.out.println("the price is = $"+num3);
          /*from  w w w  .  j  a  v  a 2  s  .  co  m*/
          byte mybyte;
          mybyte = 120;
          
          char letter;
          letter = 'a' ;
          System.out.println("the letter a " );
          System.out.println("the letter zz " );
          
     }

}

Related Topic