fork download
  1. object Main extends App {
  2. println(5.isInstanceOf[Any])
  3. println(5.getClass())
  4. println(5.toString())
  5. // tutaj powstanie tablica małych intów
  6. Array[Int](1, 2, 3)
  7. // tutaj powstanie lista objectów, bo mamy wymazywanie typów
  8. // więc będzie działać podobnie jak List<object> w C#
  9. List[Int](1, 2, 3)
  10. }
Success #stdin #stdout 0.37s 4382720KB
stdin
Standard input is empty
stdout
true
int
5