aquaballoon

Java - Anonymous Inner Class (Runnable)

Jul 15th, 2013
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.33 KB | None | 0 0
  1. package com.peter.inheritance;
  2.  
  3. public class Main {
  4.  
  5.     public static void main(String[] args) {
  6.         new Thread(new Runnable() {          // ------------------> Anonymous Inner Class  
  7.             @Override
  8.                 public void run() {  // -------------------> Overriding
  9.                     System.out.println("This is Thread.");     
  10.                 }
  11.             }).start();
  12.      }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment