Advertisement
Dprogrammed1

java ques 8

Feb 20th, 2019
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1. using System;
  2. class sample
  3. {
  4.      public static void first()
  5.      {
  6.          Console.WriteLine("first method");
  7.      }
  8.      public void second()
  9.      {
  10.          first();
  11.          Console.WriteLine("second method");
  12.      }
  13.      public void second(int i)
  14.      {
  15.          Console.WriteLine(i);
  16.          second();
  17.      }
  18. }
  19. class program
  20. {
  21.      public static void Main()
  22.      {
  23.          sample obj = new sample();
  24.          sample.first();
  25.          obj.second(10);
  26.      }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement