#Java 7:(削除) 53 (削除ここまで) 52 Bytes
Java 7:(削除) 53 (削除ここまで) 52 Bytes
int g(String _){return"google"==_?0/0:_.length();}
Above code will throw ArithmeticException for division by zero and for any String other than google. Worth to note that == compares reference and won't work for String Objects.
Java 8 : 29 Bytes
#Java 8 : 29 Bytes (Based on suggestion given in below comment)
s->s=="google"?0/0:s.length()
#Java 7:(削除) 53 (削除ここまで) 52 Bytes
int g(String _){return"google"==_?0/0:_.length();}
Above code will throw ArithmeticException for division by zero and for any String other than google. Worth to note that == compares reference and won't work for String Objects.
#Java 8 : 29 Bytes (Based on suggestion given in below comment)
s->s=="google"?0/0:s.length()
Java 7:(削除) 53 (削除ここまで) 52 Bytes
int g(String _){return"google"==_?0/0:_.length();}
Above code will throw ArithmeticException for division by zero and for any String other than google. Worth to note that == compares reference and won't work for String Objects.
Java 8 : 29 Bytes
(Based on suggestion given in below comment)
s->s=="google"?0/0:s.length()
#Java 7:(削除) 53 (削除ここまで) 52 Bytes
int g(String _){return"google"==_?0/0:_.length();}
Above code will throw ArithmeticException for division by zero and for any String other than google. Worth to note that == compares reference and won't work for String Objects.
#Java 8 : 29 Bytes (Based on suggestion given in below comment)
s->s=="google"?0/0:s.length()
#Java (削除) 53 (削除ここまで) 52 Bytes
int g(String _){return"google"==_?0/0:_.length();}
Above code will throw ArithmeticException for division by zero and for any String other than google. Worth to note that == compares reference and won't work for String Objects.
#Java 7:(削除) 53 (削除ここまで) 52 Bytes
int g(String _){return"google"==_?0/0:_.length();}
Above code will throw ArithmeticException for division by zero and for any String other than google. Worth to note that == compares reference and won't work for String Objects.
#Java 8 : 29 Bytes (Based on suggestion given in below comment)
s->s=="google"?0/0:s.length()
#Java 53(削除) 53 (削除ここまで) 52 Bytes
int g(String s_){return"google"==sreturn"google"==_?null0/0:s_.length();}
Above code will throw very famous NullPointerExceptionArithmeticException for division by zero and for any String other than google. Worth to note that == compares reference and won't work for String Objects.
#Java 53 Bytes
int g(String s){return"google"==s?null:s.length();}
Above code will throw very famous NullPointerException and for any String other than google. Worth to note that == compares reference and won't work for String Objects.
#Java (削除) 53 (削除ここまで) 52 Bytes
int g(String _){return"google"==_?0/0:_.length();}
Above code will throw ArithmeticException for division by zero and for any String other than google. Worth to note that == compares reference and won't work for String Objects.