Skip to content

Commit 3378a7d

Browse files
committed
Parameterized methods inside Parameterized Classes
1 parent d7f0afd commit 3378a7d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

4.Classes-Objects/Box.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//Box class with Parameterized Types
1+
//Box class with Parameterized Types
22
case class Box[T](t:T)
33
{
44
def coupleWith[U](u:U):Box[Couple[T, U]] = Box(Couple(t, u))

4.Classes-Objects/BoxScript.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ val cplIntStringBox:Box[Couple[Int, String]] = intBox4.coupleWith("Scala")
1919
println(cplIntStringBox.t.first)
2020
println(cplIntStringBox.t.second)
2121

22-
/**
22+
/**
2323
Sample output
2424
scala -nc BoxScript.scala
2525
3.14

4.Classes-Objects/Couple.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Parameterized methods can be used in conjuction with parameterized classes
2+
Parameterized methods can be used in conjuction with parameterized classes
33
*/
44

55
//Couple class with multiple parameterized types

4.Classes-Objects/CoupleScript.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ println(empCpl)
1111
println(empCpl.swap)
1212

1313
/**
14-
Sample Output
14+
Sample Output
1515
scala -nc CoupleScript.scala
1616
Pi value is: 3.14
1717
Couple(Employee(Johnny, English, Programmer),Employee(James, Bond, Programmer))

0 commit comments

Comments
 (0)