Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void foo(Integer bar) { }
- public class Test {
- private static void someMethod(char c) throws Exception {
- throw new Exception("I don't think so, matey!");
- }
- private static void someMethod(int i) {
- System.out.println(i);
- }
- public static void main(String[] args) throws Exception {
- someMethod(100);
- someMethod('d');
- }
- }
- 100
- Exception in thread "main" java.lang.Exception: I don't think so, matey!
- at Test.someMethod(Test.java:4)
- at Test.main(Test.java:13)
- class CharIntCast
- {
- private static void someMethod(int i)
- {
- }
- public static void main(String[] args)
- {
- someMethod(100);
- someMethod('d');
- }
- }
- Compiled from "CharIntCast.java"
- class CharIntCast extends java.lang.Object{
- CharIntCast();
- Code:
- 0: aload_0
- 1: invokespecial #1; //Method java/lang/Object."<init>":()V
- 4: return
- private static void someMethod(int);
- Code:
- 0: return
- public static void main(java.lang.String[]);
- Code:
- 0: bipush 100
- 2: invokestatic #2; //Method someMethod:(I)V
- 5: bipush 100
- 7: invokestatic #2; //Method someMethod:(I)V
- 10: return
- }
- char a = '5';
- String a_s = String.valueOf(a);
- int a_i = Integer.parseInt(a_s);
- setBrightness(a_i)
Add Comment
Please, Sign In to add comment