Created
December 6, 2015 18:25
-
-
Save ProZhar/526210a49cc981fcdb25 to your computer and use it in GitHub Desktop.
com.javarush.test.level10.lesson04.task04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javarush.test.level10.lesson04.task04; | |
/* Задача №4 на преобразование целых типов | |
Добавить одну операцию по преобразованию типа, чтобы получался ответ: nine=9 | |
short number = 9; | |
char zero = '0'; | |
int nine = (zero + number); | |
*/ | |
public class Solution | |
{ | |
public static void main(String[] args) | |
{ | |
short number = 9; | |
char zero = '0'; | |
int nine = (zero + number); | |
System.out.println((char) nine); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment