From afc13cf9f83953df3b37c0e37b4076de25ede672 Mon Sep 17 00:00:00 2001 From: Oleksii Aleshchenko Date: Thu, 16 Mar 2023 15:21:51 +0200 Subject: [PATCH] add char example for lab1 --- src/Lab1.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Lab1.java b/src/Lab1.java index 241b984..6e7403c 100644 --- a/src/Lab1.java +++ b/src/Lab1.java @@ -1,5 +1,15 @@ public class Lab1 { public static void main(String[] args) { +// char c = 'a' + '1'; + char c = 97; +// char c = '1'; + System.out.println(c); + System.out.println((int) c); + c++; + System.out.println(c); + System.out.println((int) c); + System.out.println((double)'1'/'3'); + // System.out.println( (double) 0 / 0 ); // System.out.println( Math.sqrt(-1) ); double s = 0;