class Vehicle {
public func method1() {...}
private func method2() {...}
}
class Student {
// private property
private var name = "Tim Cook"
// private method
private func display() {
print("Hello from Student class")
}
}
// create object of Student class
var student1 = Student()
// access name property
print("Name:", student1.name)
// access display() method
student1.display()