Skip to content

Instantly share code, notes, and snippets.

@ProZhar
Created December 6, 2015 18:25
Show Gist options
  • Save ProZhar/526210a49cc981fcdb25 to your computer and use it in GitHub Desktop.
Save ProZhar/526210a49cc981fcdb25 to your computer and use it in GitHub Desktop.
com.javarush.test.level10.lesson04.task04
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