File tree Expand file tree Collapse file tree 8 files changed +56
-0
lines changed
S01L08 - Primitive Data Types - float type
src/main/java/org/studyeasy
maven-status/maven-compiler-plugin
testCompile/default-testCompile Expand file tree Collapse file tree 8 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
3
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5
+ <modelVersion >4.0.0</modelVersion >
6
+
7
+ <groupId >org.studyeasy</groupId >
8
+ <artifactId >HelloWorldMaven</artifactId >
9
+ <version >1.0-SNAPSHOT</version >
10
+ <packaging >jar</packaging >
11
+
12
+ <properties >
13
+ <maven .compiler.source>17</maven .compiler.source>
14
+ <maven .compiler.target>17</maven .compiler.target>
15
+ </properties >
16
+
17
+ <build >
18
+ <plugins >
19
+ <plugin >
20
+ <!-- Build an executable JAR -->
21
+ <groupId >org.apache.maven.plugins</groupId >
22
+ <artifactId >maven-jar-plugin</artifactId >
23
+ <version >3.1.0</version >
24
+ <configuration >
25
+ <archive >
26
+ <manifest >
27
+ <mainClass >org.studyeasy.Sample</mainClass >
28
+ </manifest >
29
+ </archive >
30
+ </configuration >
31
+ </plugin >
32
+ </plugins >
33
+ </build >
34
+
35
+ </project >
Original file line number Diff line number Diff line change
1
+ package org .studyeasy ;
2
+ /* Author: Chand Sheikh */
3
+
4
+ public class Sample {
5
+ public static void main (String [] args ) {
6
+ float max = 3.40282346638528860e+38f ; // 4 byte
7
+ float min = 1.40129846432481707e-45f ;
8
+ double doubleMax = 1.79769313486231570e+308d ; // 8 byte
9
+ double doubleMin = 4.94065645841246544e-324d ;
10
+
11
+ System .out .println (doubleMax );
12
+ System .out .printf ("%.2f" ,doubleMax );
13
+
14
+ }
15
+ }
Original file line number Diff line number Diff line change
1
+ # Created by Apache Maven 3.6.3
2
+ groupId =org.studyeasy
3
+ artifactId =HelloWorldMaven
4
+ version =1.0-SNAPSHOT
Original file line number Diff line number Diff line change
1
+ org\studyeasy\HelloWorld.class
Original file line number Diff line number Diff line change
1
+ C:\Users\Chaand\IdeaProjects\HelloWorldMaven\src\main\java\org\studyeasy\HelloWorld.java
You can’t perform that action at this time.
0 commit comments