Groovy - getFrom()


Advertisements

Get the lower value of this Range.

Syntax

Comparable getFrom()

Parameters

None

Return Value

The lower value of the range.

Example

Following is an example of the usage of this method −

class Example { 
   static void main(String[] args) { 
      // Example of an Integer using def 
      def rint = 1..10; 
      println(rint.getFrom()); 
   } 
}

When we run the above program, we will get the following result −

1
groovy_ranges.htm
Advertisements