Skip to content

Commit

Permalink
Create StudentStatic.java
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadmuzzammil1998 committed Feb 6, 2019
1 parent df16ffe commit 80effa4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Java/StudentStatic.java
@@ -0,0 +1,20 @@
public class StudentStatic {
static String course = "BCA";
String name;
int roll;

StudentStatic(String name, int roll) {
this.name = name;
this.roll = roll;
}

static void PrintName(StudentStatic stu) {
System.out.println(stu.name + ", Roll no. " + stu.roll);
}

public static void main(String[] args) {
StudentStatic stu = new StudentStatic("Muzzammil", 8);
System.out.println("Course: " + course);
PrintName(stu);
}
}

0 comments on commit 80effa4

Please sign in to comment.