Skip to content

Commit 14ccd74

Browse files
committed
apr25
1 parent b5a35fd commit 14ccd74

9 files changed

Lines changed: 84 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
5+
<classpathentry kind="output" path="bin"/>
6+
</classpath>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>MonthDemo</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=1.8
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11+
org.eclipse.jdt.core.compiler.source=1.8
919 Bytes
Binary file not shown.
889 Bytes
Binary file not shown.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import java.time.Month;
2+
3+
public class MonthDemo1
4+
{
5+
public static void main(String[] args)
6+
{
7+
Month month = Month.of(2);
8+
System.out.println("Before minus, Month = "+month);
9+
10+
/*
11+
* Parameters:
12+
*
13+
* months - the months to subtract, positive or negative
14+
*
15+
* Returns:
16+
*
17+
* the resulting month, not null
18+
*/
19+
month = month.minus(1);
20+
System.out.println("After minus, Month = "+month);
21+
}
22+
23+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import java.time.Month;
2+
3+
public class MonthDemo2
4+
{
5+
public static void main(String[] args)
6+
{
7+
Month month = Month.of(2);
8+
System.out.println("Before plus, Month = "+month);
9+
10+
/*
11+
* Parameters:
12+
*
13+
* months - the months to add, positive or negative
14+
*
15+
* Returns:
16+
*
17+
* the resulting month, not null
18+
*/
19+
month = month.plus(1);
20+
System.out.println("Before plus, Month = "+month);
21+
}
22+
23+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Before minus, Month = FEBRUARY
2+
After minus, Month = JANUARY
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Before plus, Month = FEBRUARY
2+
Before plus, Month = MARCH

0 commit comments

Comments
 (0)