//Triangle constructor public Triangle(int x, int y, int width, int height, Color color, MultiThread m, int speed) { //instance variables this.xLoc = x; this.yLoc = y; this.width = width; this.height = height; this.color = color; this.multiThread = m; this.speed = speed; }
static void Main(String[] args) { MultiThread mt = new MultiThread(); Thread T1 = new Thread(delegate() { Console.WriteLine("The sum of two numbers is: " + mt.Thread1(2, 3)); }); Thread T2 = new Thread(delegate() { Console.WriteLine(" The cube of given num is: " + mt.Thread2(20)); }); Thread T3 = new Thread(delegate() { Console.WriteLine("The Concatenation of strings: " + mt.Thread3("priscilla", "Katherine")); }); T1.Start(); T2.Start(); T3.Start(); Console.ReadLine(); }