SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
Java
History & Trends
Kaunas JUG
Dainius Mežanskas · kaunas.jug@gmail.com · http://plus.google.com/+KaunasJUG
Dainius Mežanskas
● 16 years of Java
● Java SE/EE
● e-Learning · Insurance · Telecommunications ·
e-Commerce
● KTU DMC · Exigen Group · NoMagic Europe ·
Modnique Baltic
Java Birth
Java father
James Arthur Gosling
● 1991 – “Green Project”; “Duke”
● *7
● Applet
● 1993 – Mosaic
● 1994 – HotJava ™ (WebRunner)
*7Device·HotJava™
Press Announcement, 1995
JDK 1.0
● 1994 – “Invented” (Oak)
● 1995 – JDK Alpha and Beta
● 1996, Jan 23 – JDK 1.0 (1.0.2)
● 1 year · 38 licensees, 6,000 devs at JavaOne
● 2 year · 100 licensees, 10,000 devs at JavaOne
Language Goals & Objectives
● Garbage collection
● Run on wide range of devices
● Security Model
● Networking · Run Remote Code
● Threading ● Object Oriented
What was so Exciting...
● JVM · Byte Code · WORA
● Simpler syntax (than C++)
● Implicit Pointers to Objects
● Auto memory allocation (GC)
● Threads · Exceptions
… and what wasn’t!
● Interpreted Language
● Not Efficient Memory Model
(Double-Checked Locking is Broken)
● Slow Startup and Execution
Criticism
● Stat. /dynamic.
scoped functions
● Inlined functions
● Pointers to functions
● Long-living closures
● Preprocessing
● Macros system
● Multiple inheritance
● Operator override
● printf()
● unsigned primitives
● Unicode Strings
Java Processor (Chip)
● picoJava
● Dozen of other
implementations
JDK 1.1 · (Feb 19, 1997)
● JavaBeans
● Improved AWT
● JDBC, RMI, Reflection
● Inner classes
● JIT, for Windows only (by Symantec)
J2SE 1.2 · Playground · (Dec 8, 1998)
● J2SE, J2EE, J2ME
● 3x · 1520 classes in 59
packages
● Sun's JIT compiler
● Collections framework
● Integrated Swing API
● strictfp keyword
● Java plug-in
● Java IDL/for
CORBA
Java EE
❖ 1999 · J2EE 1.2
❖ 2001 · J2EE 1.3
❖ 2003 · J2EE 1.4
❖ 2006 · Java EE 5
❖ 2009 · Java EE 6
❖ 2013 · Java EE 7
Java ME
● CLDC 1.0, 1.1
● MIDP 1.0, 2.0, 3.0
● IMP 1.0, 2.0
J2SE 1.3 · Kestrel · (May 8, 2000)
● HotSpot JVM
● Synthetic (Dynamic) proxy classes
● JNDI included
● Debugger Architecture (JPDA)
● RMI + CORBA ● JavaSound
J2SE 1.4 · Merlin · (Feb 6, 2002)
● JCP · JSR 59
● assert keyword
● Exception Chaining
● RegEx
● NIO · IPv6 · Logging
● Image API
● JAXP
● JCE · JSSE · JAAS
● Java Web Start
● Preferences API
J2SE 5.0 · Tiger · (Sep 30, 2004)
● Generics
● @Annotations
● Autoboxing
● enum keyword
● Varargs
● for each loop
● Static imports
● Mem Model Fix
● RMI auto stubs
● java.util.concurrent
OpenJDK · (Nov 13, 2006)
● Sun Microsystems made the
bulk of its implementation of
Java available under the GNU
General Public License (GPL)
Java SE 6 · Mustang · (Dec 11, 2006)
● Performance impr.
● JVM/GC impr.
● Scripting Language
Support
● Java Compiler API
● JAX-WS
● JDBC 4.0
● JAXB 2.0 · StAX
● Pluggable annotations
(http://projectlombok.org/)
R.I.PSun(Jan27,2010)
Java SE 7 · Dolphin · (Jul 28, 2011)
● invokedynamic
● switch
● autocloseable
● <>
● 0b10_01
● catch()
● Concurrency · File
I/O · Timsort · New
File I/O · Crypto · 2D ·
Protocols SCTP SDP
· etc.
Java SE 8 · (Expected Mar 18, 2014)
● Lambda (closures)
● Bulk Data Operations
for Collections
● Nashorn (JS engine)
● Unsigned Int/Long
● Date & Time API
● Repeating Annotations
● Remove PerGen
● Base64 · HashMap ·
JDBC 4.2 · Crypto · etc.
Java SE 9 · (2016 ?)
● Better support for
multi-gigabyte heaps
● Self-tuning JVM
● Money and Currency API
● Modularization of the
JDK (Jigsaw)
Java SE 10 · Speculation · (2018 ??)
● Removing primitive
data types.
● 64-bit addressable
arrays to support
large data sets.
JVMs
● HotSpot
● JRockit
● IBM J9 JVM
JVMLanguages
JVMPopularity
JavaScript (+1)
Java (-1)
PHP
C# (+2)
Python (-1)
C++ (+1)
Ruby (-2)
C
Objective-C
CSS (new)
Perl
Shell (-2)
Scala (-1)
Haskell
R (1)
Matlab (+3)
Clojure (+5)
CoffeeScript (-1)
Visual Basic (+1)
Groovy (-2)
TOP 20
http://redmonk.com/sogrady/2014/01/22/language-rankings-1-14/
Avatar · (avatar.java.net)
Java · Source Code Example
public class CalculateCircleAreaExample {
public static void main(String[] args) {
int radius = 0;
System.out.println("Please enter radius of a circle");
try {
BufferedReader br = new BufferedReader(
new InputStreamReader(System.in));
radius = Integer.parseInt(br.readLine());
} catch (Exception e) {
System.out.println("Error :" + e);
System.exit(0);
}
double area = Math.PI * radius * radius;
System.out.println("Area of a circle is " + area);
}
}
object reduceList {
val nums = List(2, -4, 5, 7)
def sum1(xs: List[Int]) = (0 :: xs) reduceLeft ((x, y) => x + y)
sum1(nums)
def sum(xs: List[Int]) = (0 :: xs) reduceLeft (_ + _)
sum(nums)
def product(xs: List[Int]) = (1 :: xs) reduceLeft (_ * _)
product(nums)
def concat[T](xs: List[T], ys: List[T]): List[T] = (xs foldRight ys)(_ ::
_)
}
Scala · Source Code Example
Groovy · Source Code Example
def sudoku(values) {
def i = values.indexOf(48);
if (i < 0)
print values
else
(('1'..'9') - (0..80).collect { j ->
g = { (int) it(i) == (int) it(j) };
g { it / 9 } | g { it % 9 } | g { it / 27 } &
g { it % 9 / 3 } ? values[j] : '0'
}).each {
sudoku(values[0..<i] + it + values[i + 1..-1])
}
}
Java Forever
Thank
You!

Weitere ähnliche Inhalte

Ähnlich wie Kaunas JUG#1: Java History and Trends (Dainius Mezanskas)

GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話
GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話
GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話
なおき きしだ
 
Using Grails to power your electric car
Using Grails to power your electric carUsing Grails to power your electric car
Using Grails to power your electric car
Marco Pas
 
Using Grails to Power your Electric Car
Using Grails to Power your Electric CarUsing Grails to Power your Electric Car
Using Grails to Power your Electric Car
GR8Conf
 

Ähnlich wie Kaunas JUG#1: Java History and Trends (Dainius Mezanskas) (20)

Java: Rumours of my demise are greatly exaggerated
Java: Rumours of my demise are greatly exaggeratedJava: Rumours of my demise are greatly exaggerated
Java: Rumours of my demise are greatly exaggerated
 
Jakarta EE 2018
Jakarta EE 2018Jakarta EE 2018
Jakarta EE 2018
 
Jozi-JUG JDK 9 Unconference
Jozi-JUG JDK 9 UnconferenceJozi-JUG JDK 9 Unconference
Jozi-JUG JDK 9 Unconference
 
Java 9 and Project Jigsaw
Java 9 and Project JigsawJava 9 and Project Jigsaw
Java 9 and Project Jigsaw
 
Java Training In Ahmedabad
Java Training In AhmedabadJava Training In Ahmedabad
Java Training In Ahmedabad
 
Progress_190315
Progress_190315Progress_190315
Progress_190315
 
Karaf ee-apachecon eu-2012
Karaf ee-apachecon eu-2012Karaf ee-apachecon eu-2012
Karaf ee-apachecon eu-2012
 
Java 9-10 What's New
Java 9-10 What's NewJava 9-10 What's New
Java 9-10 What's New
 
Node.js Test
Node.js TestNode.js Test
Node.js Test
 
De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14
 
GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話
GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話
GraalVMの紹介とTruffleでPHPぽい言語を実装したら爆速だった話
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introduction
 
Java8 launch AMIS Services by Lucas Jellema
Java8 launch AMIS Services by Lucas Jellema Java8 launch AMIS Services by Lucas Jellema
Java8 launch AMIS Services by Lucas Jellema
 
Java8 launch at AMIS Services / First8
Java8 launch at AMIS Services / First8Java8 launch at AMIS Services / First8
Java8 launch at AMIS Services / First8
 
Java 8 Launch Event - Past, Present and Future of Java and Java 8 key themes
Java 8 Launch Event - Past, Present and Future of Java and Java 8 key themesJava 8 Launch Event - Past, Present and Future of Java and Java 8 key themes
Java 8 Launch Event - Past, Present and Future of Java and Java 8 key themes
 
De Java 8 ate Java 14
De Java 8 ate Java 14De Java 8 ate Java 14
De Java 8 ate Java 14
 
Using Grails to power your electric car
Using Grails to power your electric carUsing Grails to power your electric car
Using Grails to power your electric car
 
Using Grails to power your electric car
Using Grails to power your electric carUsing Grails to power your electric car
Using Grails to power your electric car
 
Using Grails to Power your Electric Car
Using Grails to Power your Electric CarUsing Grails to Power your Electric Car
Using Grails to Power your Electric Car
 
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
 

Mehr von Kaunas Java User Group

Intro to Java 8 Closures (Dainius Mezanskas)
Intro to Java 8 Closures (Dainius Mezanskas)Intro to Java 8 Closures (Dainius Mezanskas)
Intro to Java 8 Closures (Dainius Mezanskas)
Kaunas Java User Group
 

Mehr von Kaunas Java User Group (13)

Smart House Based on Raspberry PI + Java EE by Tadas Brasas
Smart House Based on Raspberry PI + Java EE by Tadas BrasasSmart House Based on Raspberry PI + Java EE by Tadas Brasas
Smart House Based on Raspberry PI + Java EE by Tadas Brasas
 
Presentation
PresentationPresentation
Presentation
 
Automated infrastructure
Automated infrastructureAutomated infrastructure
Automated infrastructure
 
Adf presentation
Adf presentationAdf presentation
Adf presentation
 
Bye Bye Cowboy Coder Days! (Legacy Code & TDD)
Bye Bye Cowboy Coder Days! (Legacy Code & TDD)Bye Bye Cowboy Coder Days! (Legacy Code & TDD)
Bye Bye Cowboy Coder Days! (Legacy Code & TDD)
 
Building with Gradle
Building with GradleBuilding with Gradle
Building with Gradle
 
Flyway
FlywayFlyway
Flyway
 
Eh cache in Kaunas JUG
Eh cache in Kaunas JUGEh cache in Kaunas JUG
Eh cache in Kaunas JUG
 
Apache Lucene Informacijos paieška
Apache Lucene Informacijos paieška Apache Lucene Informacijos paieška
Apache Lucene Informacijos paieška
 
Java 8 Stream API (Valdas Zigas)
Java 8 Stream API (Valdas Zigas)Java 8 Stream API (Valdas Zigas)
Java 8 Stream API (Valdas Zigas)
 
Intro to Java 8 Closures (Dainius Mezanskas)
Intro to Java 8 Closures (Dainius Mezanskas)Intro to Java 8 Closures (Dainius Mezanskas)
Intro to Java 8 Closures (Dainius Mezanskas)
 
Kaunas JUG#1: Intro (Valdas Zigas)
Kaunas JUG#1: Intro (Valdas Zigas)Kaunas JUG#1: Intro (Valdas Zigas)
Kaunas JUG#1: Intro (Valdas Zigas)
 
Kaunas JUG#2: Devoxx 2013 (Saulius Tvarijonas)
Kaunas JUG#2: Devoxx 2013 (Saulius Tvarijonas)Kaunas JUG#2: Devoxx 2013 (Saulius Tvarijonas)
Kaunas JUG#2: Devoxx 2013 (Saulius Tvarijonas)
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

Kaunas JUG#1: Java History and Trends (Dainius Mezanskas)

  • 1. Java History & Trends Kaunas JUG Dainius Mežanskas · kaunas.jug@gmail.com · http://plus.google.com/+KaunasJUG
  • 2. Dainius Mežanskas ● 16 years of Java ● Java SE/EE ● e-Learning · Insurance · Telecommunications · e-Commerce ● KTU DMC · Exigen Group · NoMagic Europe · Modnique Baltic
  • 3. Java Birth Java father James Arthur Gosling ● 1991 – “Green Project”; “Duke” ● *7 ● Applet ● 1993 – Mosaic ● 1994 – HotJava ™ (WebRunner)
  • 6. JDK 1.0 ● 1994 – “Invented” (Oak) ● 1995 – JDK Alpha and Beta ● 1996, Jan 23 – JDK 1.0 (1.0.2) ● 1 year · 38 licensees, 6,000 devs at JavaOne ● 2 year · 100 licensees, 10,000 devs at JavaOne
  • 7. Language Goals & Objectives ● Garbage collection ● Run on wide range of devices ● Security Model ● Networking · Run Remote Code ● Threading ● Object Oriented
  • 8. What was so Exciting... ● JVM · Byte Code · WORA ● Simpler syntax (than C++) ● Implicit Pointers to Objects ● Auto memory allocation (GC) ● Threads · Exceptions
  • 9. … and what wasn’t! ● Interpreted Language ● Not Efficient Memory Model (Double-Checked Locking is Broken) ● Slow Startup and Execution
  • 10. Criticism ● Stat. /dynamic. scoped functions ● Inlined functions ● Pointers to functions ● Long-living closures ● Preprocessing ● Macros system ● Multiple inheritance ● Operator override ● printf() ● unsigned primitives ● Unicode Strings
  • 11. Java Processor (Chip) ● picoJava ● Dozen of other implementations
  • 12. JDK 1.1 · (Feb 19, 1997) ● JavaBeans ● Improved AWT ● JDBC, RMI, Reflection ● Inner classes ● JIT, for Windows only (by Symantec)
  • 13. J2SE 1.2 · Playground · (Dec 8, 1998) ● J2SE, J2EE, J2ME ● 3x · 1520 classes in 59 packages ● Sun's JIT compiler ● Collections framework ● Integrated Swing API ● strictfp keyword ● Java plug-in ● Java IDL/for CORBA
  • 14. Java EE ❖ 1999 · J2EE 1.2 ❖ 2001 · J2EE 1.3 ❖ 2003 · J2EE 1.4 ❖ 2006 · Java EE 5 ❖ 2009 · Java EE 6 ❖ 2013 · Java EE 7
  • 15. Java ME ● CLDC 1.0, 1.1 ● MIDP 1.0, 2.0, 3.0 ● IMP 1.0, 2.0
  • 16. J2SE 1.3 · Kestrel · (May 8, 2000) ● HotSpot JVM ● Synthetic (Dynamic) proxy classes ● JNDI included ● Debugger Architecture (JPDA) ● RMI + CORBA ● JavaSound
  • 17. J2SE 1.4 · Merlin · (Feb 6, 2002) ● JCP · JSR 59 ● assert keyword ● Exception Chaining ● RegEx ● NIO · IPv6 · Logging ● Image API ● JAXP ● JCE · JSSE · JAAS ● Java Web Start ● Preferences API
  • 18. J2SE 5.0 · Tiger · (Sep 30, 2004) ● Generics ● @Annotations ● Autoboxing ● enum keyword ● Varargs ● for each loop ● Static imports ● Mem Model Fix ● RMI auto stubs ● java.util.concurrent
  • 19. OpenJDK · (Nov 13, 2006) ● Sun Microsystems made the bulk of its implementation of Java available under the GNU General Public License (GPL)
  • 20. Java SE 6 · Mustang · (Dec 11, 2006) ● Performance impr. ● JVM/GC impr. ● Scripting Language Support ● Java Compiler API ● JAX-WS ● JDBC 4.0 ● JAXB 2.0 · StAX ● Pluggable annotations (http://projectlombok.org/)
  • 22. Java SE 7 · Dolphin · (Jul 28, 2011) ● invokedynamic ● switch ● autocloseable ● <> ● 0b10_01 ● catch() ● Concurrency · File I/O · Timsort · New File I/O · Crypto · 2D · Protocols SCTP SDP · etc.
  • 23. Java SE 8 · (Expected Mar 18, 2014) ● Lambda (closures) ● Bulk Data Operations for Collections ● Nashorn (JS engine) ● Unsigned Int/Long ● Date & Time API ● Repeating Annotations ● Remove PerGen ● Base64 · HashMap · JDBC 4.2 · Crypto · etc.
  • 24. Java SE 9 · (2016 ?) ● Better support for multi-gigabyte heaps ● Self-tuning JVM ● Money and Currency API ● Modularization of the JDK (Jigsaw)
  • 25. Java SE 10 · Speculation · (2018 ??) ● Removing primitive data types. ● 64-bit addressable arrays to support large data sets.
  • 28. JVMPopularity JavaScript (+1) Java (-1) PHP C# (+2) Python (-1) C++ (+1) Ruby (-2) C Objective-C CSS (new) Perl Shell (-2) Scala (-1) Haskell R (1) Matlab (+3) Clojure (+5) CoffeeScript (-1) Visual Basic (+1) Groovy (-2) TOP 20 http://redmonk.com/sogrady/2014/01/22/language-rankings-1-14/
  • 30. Java · Source Code Example public class CalculateCircleAreaExample { public static void main(String[] args) { int radius = 0; System.out.println("Please enter radius of a circle"); try { BufferedReader br = new BufferedReader( new InputStreamReader(System.in)); radius = Integer.parseInt(br.readLine()); } catch (Exception e) { System.out.println("Error :" + e); System.exit(0); } double area = Math.PI * radius * radius; System.out.println("Area of a circle is " + area); } }
  • 31. object reduceList { val nums = List(2, -4, 5, 7) def sum1(xs: List[Int]) = (0 :: xs) reduceLeft ((x, y) => x + y) sum1(nums) def sum(xs: List[Int]) = (0 :: xs) reduceLeft (_ + _) sum(nums) def product(xs: List[Int]) = (1 :: xs) reduceLeft (_ * _) product(nums) def concat[T](xs: List[T], ys: List[T]): List[T] = (xs foldRight ys)(_ :: _) } Scala · Source Code Example
  • 32. Groovy · Source Code Example def sudoku(values) { def i = values.indexOf(48); if (i < 0) print values else (('1'..'9') - (0..80).collect { j -> g = { (int) it(i) == (int) it(j) }; g { it / 9 } | g { it % 9 } | g { it / 27 } & g { it % 9 / 3 } ? values[j] : '0' }).each { sudoku(values[0..<i] + it + values[i + 1..-1]) } }