Created
December 4, 2015 08:55
-
-
Save ProZhar/d2eaed31ba39df3cb4fd to your computer and use it in GitHub Desktop.
com.javarush.test.level09.lesson06.task02
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.level09.lesson06.task02; | |
/* Исключение при работе со строками | |
Перехватить исключение (и вывести его на экран), указав его тип, возникающее при выполнении кода: | |
String s = null; | |
String m = s.toLowerCase(); | |
*/ | |
public class Solution | |
{ | |
public static void main(String[] args) throws Exception | |
{ | |
try | |
{ | |
String s = null; | |
String m = s.toLowerCase(); | |
} | |
catch (Exception e) | |
{ | |
System.out.println(e); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment