Swift - Basics and Runtime
Identify the error in this Swift program using
@main:
@main class App {
func main() {
print("Hello")
}
}@main:
@main class App {
func main() {
print("Hello")
}
}@main type must have a static main() method to serve as the entry point.main() is an instance method, missing static, causing a compile error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions