Computer Science, asked by TwilightWolfie, 28 days ago

Answer the following in the given snippet:

class Exam

int x.y; void School()

int a,b;

System.out.println("Delhi Public School");

public static void main()

1

int,m,n;

Exam School= new Exam();

1

(i) What is the object name of the class Exam? (ii) Name the class variables used in the program.

(iii) List the local variables used in the program. (iv) Write the type of function used.

(v) Write the name of the function.​

Answers

Answered by Oreki
4

\textsf{\bf\large Given Snippet}

  \texttt{class Exam \{}\\\\\texttt{\hspace{1.5em}int x, y;}\\\\\texttt{\hspace{1.5em}void School() \{}\\\texttt{\hspace{3em}int a, b;}\\\texttt{\hspace{3em}System.out.println("Delhi Public School");}\\\texttt{\hspace{1.5em}\}}\\\\\texttt{\hspace{1.5em}public static void main(String[] args) \{}\\\texttt{\hspace{3em}int m, n;}\\\texttt{\hspace{3em}Exam school = new Exam();}\\\texttt{\hspace{1.5em}\}}\\\texttt{\}}

\textsf{\bf\large Answers}

  \textsf{(i) school}\\\textsf{(ii) x and y}\\\textsf{(iii) a and b - School()}\\\textsf{\hspace{1.5em} m and n - main()}\\\textsf{(iv) void}\\\textsf{(v) School}

Similar questions