C Sharp (C#) - Classes and Objects
You want to create two independent objects of class
Student with different names. Which code correctly does this?Student with different names. Which code correctly does this?new Student(name).new. Student s1, s2 = new Student("Alice"), new Student("Bob"); has invalid syntax for multiple declarations. Student s1 = new Student; Student s2 = new Student; misses parentheses and parameters.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions