Guest User

Untitled

a guest
Jun 17th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. void foo(Integer bar) { }
  2.  
  3. public class Test {
  4. private static void someMethod(char c) throws Exception {
  5. throw new Exception("I don't think so, matey!");
  6. }
  7. private static void someMethod(int i) {
  8. System.out.println(i);
  9. }
  10. public static void main(String[] args) throws Exception {
  11. someMethod(100);
  12. someMethod('d');
  13. }
  14. }
  15.  
  16. 100
  17. Exception in thread "main" java.lang.Exception: I don't think so, matey!
  18. at Test.someMethod(Test.java:4)
  19. at Test.main(Test.java:13)
  20.  
  21. class CharIntCast
  22. {
  23. private static void someMethod(int i)
  24. {
  25. }
  26.  
  27. public static void main(String[] args)
  28. {
  29. someMethod(100);
  30. someMethod('d');
  31. }
  32. }
  33.  
  34. Compiled from "CharIntCast.java"
  35. class CharIntCast extends java.lang.Object{
  36. CharIntCast();
  37. Code:
  38. 0: aload_0
  39. 1: invokespecial #1; //Method java/lang/Object."<init>":()V
  40. 4: return
  41.  
  42. private static void someMethod(int);
  43. Code:
  44. 0: return
  45.  
  46. public static void main(java.lang.String[]);
  47. Code:
  48. 0: bipush 100
  49. 2: invokestatic #2; //Method someMethod:(I)V
  50. 5: bipush 100
  51. 7: invokestatic #2; //Method someMethod:(I)V
  52. 10: return
  53.  
  54. }
  55.  
  56. char a = '5';
  57. String a_s = String.valueOf(a);
  58. int a_i = Integer.parseInt(a_s);
  59. setBrightness(a_i)
Add Comment
Please, Sign In to add comment