Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Java (programming language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Object-oriented programming language}} {{Distinguish|Java (software platform)|JavaScript|Javanese language}} {{Redirect|Openframe|the ten-pin bowling term|Open frame}} {{Pp-semi-indef|small=yes}} {{Use mdy dates|date=August 2017}} {{Infobox programming language | name = Java | logo = Java programming language logo.svg | logo size = 121px | logo caption = | paradigm = [[Programming paradigm#Multi-paradigm|Multi-paradigm]]: [[generic programming|generic]], [[object-oriented]] ([[class-based programming|class-based]]), [[functional programming|functional]], [[imperative programming|imperative]], [[reflective programming|reflective]], [[concurrent computing|concurrent]] | year = {{Start date and age|1995|5|23}}<ref>{{cite magazine|url=https://www.forbes.com/sites/oracle/2015/05/20/javas-20-years-of-innovation/|title=Java's 20 Years of Innovation|magazine=Forbes|date=May 20, 2015|access-date=March 18, 2016|author=Binstock, Andrew|archive-url=https://web.archive.org/web/20160314102242/http://www.forbes.com/sites/oracle/2015/05/20/javas-20-years-of-innovation/|archive-date=March 14, 2016|url-status=live}}</ref> | discontinued = <!-- Set to yes if software is discontinued, otherwise omit. --> | ver layout = <!-- simple (default) or stacked --> | latest release version = {{wikidata|property|preferred|references|edit|Q251|P348|P548=Q2804309}} | latest release date = {{Start date and age|{{wikidata|qualifier|preferred|single|Q251|P348|P548=Q2804309|P577}}}} | designer = [[James Gosling]] | developer = [[Oracle Corporation]] | typing = [[type system|Static, strong, safe]], [[nominal type system|nominative]], [[manifest typing|manifest]] | memory management = [[Garbage collection (computer science)|Automatic garbage collection]] | influenced_by = [[CLU (programming language)|CLU]],<ref name="BarbaraLiskov">{{cite book |title=Program Development in Java β Abstraction, Specification, and Object-Oriented Design|author=[[Barbara Liskov]] with [[John Guttag]]|isbn=978-0-201-65768-5|publisher=USA, Addison Wesley|year=2000}}</ref> [[Simula67]],<ref name="BarbaraLiskov" /> [[Lisp (programming language)|Lisp]],<ref name="BarbaraLiskov" /> [[Smalltalk]],<ref name="BarbaraLiskov" /> [[Ada (programming language)|Ada 83]], [[C++]],<ref>{{cite web|url=https://books.google.com/books?id=0rUtBAAAQBAJ&pg=PAPA133|title=Cracking The Java Programming Interview :: 2000+ Java Interview Que/Ans|first=Harry H.|last=Chaudhary|access-date=2016-05-29|date=2014-07-28|archive-date=September 29, 2023|archive-url=https://web.archive.org/web/20230929040943/https://books.google.com/books?id=0rUtBAAAQBAJ&pg=PAPA133#v=onepage&q&f=false|url-status=live}}</ref> [[C Sharp (programming language)|C#]],<ref>Java 5.0 added several new language features (the [[foreach loop|enhanced for loop]], [[object type (object-oriented programming)#Autoboxing|autoboxing]], [[variadic function|varargs]] and [[Java annotation|annotations]]), after they were introduced in the similar (and competing) [[C Sharp (programming language)|C#]] language. [http://www.barrycornelius.com/papers/java5/] {{Webarchive|url=https://web.archive.org/web/20110319065438/http://www.barrycornelius.com/papers/java5/|date=March 19, 2011}} [http://www.levenez.com/lang/] {{Webarchive|url=https://web.archive.org/web/20060107162045/http://www.levenez.com/lang/|date=January 7, 2006}}</ref> [[Eiffel (programming language)|Eiffel]],<ref>{{cite web|author1=Gosling, James|author2=McGilton, Henry|title=The Java Language Environment|date=May 1996|url=https://www.oracle.com/technetwork/java/langenv-140151.html|access-date=May 6, 2014|archive-url=https://web.archive.org/web/20140506214653/http://www.oracle.com/technetwork/java/langenv-140151.html|archive-date=May 6, 2014 |url-status=live}}</ref> [[Mesa (programming language)|Mesa]],<ref>{{cite web|author1=Gosling, James|author2=Joy, Bill |author3=Steele, Guy|author4=Bracha, Gilad|title=The Java Language Specification, 2nd Edition |url=https://java.sun.com/docs/books/jls/second_edition/html/intro.doc.html#237601|access-date=February 8, 2008|archive-url=https://web.archive.org/web/20110805051057/http://java.sun.com/docs/books/jls/second_edition/html/intro.doc.html#237601|archive-date=August 5, 2011 |url-status=live}}</ref> [[Modula-3]],<ref>{{cite web |url=http://www.computerworld.com.au/index.php/id;1422447371;pp;3;fp;4194304;fpid;1|title=The A-Z of Programming Languages: Modula-3 |publisher=Computerworld|access-date=2010-06-09|url-status=dead|archive-url=https://web.archive.org/web/20090105145818/http://www.computerworld.com.au/index.php/id%3B1422447371%3Bpp%3B3%3Bfp%3B4194304%3Bfpid%3B1|archive-date=January 5, 2009}}</ref> [[Oberon (programming language)|Oberon]],<ref>[[Niklaus Wirth]] stated on a number of public occasions, e.g. in a lecture at the Polytechnic Museum, Moscow in September 2005 (several independent first-hand accounts in Russian exist, e.g. one with an audio recording: {{cite web|author=Filippova, Elena|title=Niklaus Wirth's lecture at the Polytechnic Museum in Moscow|date=September 22, 2005|url=http://www.delphikingdom.com/asp/viewitem.asp?catalogid=1155|access-date=November 20, 2011|archive-date=December 1, 2020|archive-url=https://web.archive.org/web/20201201054813/http://www.delphikingdom.com/asp/viewitem.asp?catalogid=1155|url-status=live}}), that the Sun Java design team licensed the Oberon compiler sources a number of years prior to the release of Java and examined it: a (relative) compactness, type safety, garbage collection, no multiple inheritance for classes{{snd}} all these key overall design features are shared by Java and Oberon.</ref> [[Objective-C]],<ref>[[Patrick Naughton]] cites [[Objective-C]] as a strong influence on the design of the Java programming language, stating that notable direct derivatives include Java interfaces (derived from Objective-C's [[Objective-C#Protocols|protocol]]) and primitive wrapper classes. [http://cs.gmu.edu/~sean/stuff/java-objc.html] {{Webarchive|url=https://web.archive.org/web/20110713014816/http://cs.gmu.edu/~sean/stuff/java-objc.html|date=July 13, 2011}}</ref> [[UCSD Pascal]],<ref>{{cite web |url=http://www.fscript.org/prof/javapassport.pdf |quote=The project went ahead under the name ''green'' and the language was based on an old model of [[UCSD Pascal]], which makes it possible to generate interpretive code. |title=History of Java|work=Java Application Servers Report|author=TechMetrix Research|year=1999|archive-url=https://web.archive.org/web/20101229090912/http://www.fscript.org/prof/javapassport.pdf|archive-date=December 29, 2010|url-status=dead}}</ref><ref>{{cite magazine |title=A Conversation with James Gosling |magazine=[[ACM Queue]] |date=August 31, 2004 |url=http://queue.acm.org/detail.cfm?id=1017013 |publisher=[[Association for Computing Machinery]] |volume=2 |issue=5 |access-date=2010-06-09|archive-url=https://web.archive.org/web/20150716194245/http://queue.acm.org/detail.cfm?id=1017013|archive-date=July 16, 2015 |url-status=live}}</ref> [[Object Pascal]]<ref>{{cite report |author=((The Java Language Team)) |publisher=JavaSoft, Sun Microsystems, Inc. |url=http://java.sun.com/docs/white/delegates.html |quote=In the summer of 1996, Sun was designing the precursor to what is now the event model of the AWT and the JavaBeans component architecture. Borland contributed greatly to this process. We looked very carefully at Delphi Object Pascal and built a working prototype of bound method references in order to understand their interaction with the Java programming language and its APIs. |archive-url=https://web.archive.org/web/20120627043929/http://java.sun.com/docs/white/delegates.html |archive-date=2012-06-27 |url-status=dead |type=White Paper |title=About Microsoft's 'Delegates'}}</ref> | influenced = [[Ada (programming language)|Ada 2005]], [[ArkTS]], [[BeanShell]], [[C Sharp (programming language)|C#]], [[Chapel (programming language)|Chapel]],<ref name="chplspec">{{cite web|title=Chapel spec (Acknowledgements)|url=http://chapel.cray.com/spec/spec-0.98.pdf|date=2015-10-01|access-date=2016-01-14|publisher=Cray Inc.|archive-url=https://web.archive.org/web/20160205114946/http://chapel.cray.com/spec/spec-0.98.pdf|archive-date=February 5, 2016|url-status=live}}</ref> [[Clojure]], [[ECMAScript]], [[Fantom (programming language)|Fantom]], [[Gambas]],<ref name="gambas">{{cite web|url=http://gambaswiki.org/wiki/doc/intro?nh&l=en|title=Gambas Documentation Introduction|publisher=Gambas Website|access-date=2017-10-09|archive-url=https://web.archive.org/web/20171009041815/http://gambaswiki.org/wiki/doc/intro?nh&l=en|archive-date=October 9, 2017|url-status=live}}</ref> [[Groovy (programming language)|Groovy]], [[Hack (programming language)|Hack]],<ref>{{cite magazine|url=http://www.infoworld.com/article/2610885/facebook-q-a--hack-brings-static-typing-to-php-world.html|title=Facebook Q&A: Hack brings static typing to PHP world|magazine=InfoWorld|date=March 26, 2014|access-date=2015-01-11|archive-url=https://web.archive.org/web/20150213220946/http://www.infoworld.com/article/2610885/facebook-q-a--hack-brings-static-typing-to-php-world.html|archive-date=February 13, 2015|url-status=live}}</ref> [[Haxe]], [[Visual J Sharp|J#]], [[JavaScript]], [[JS++]], [[Kotlin (programming language)|Kotlin]], [[PHP]], [[Python (programming language)|Python]], [[Scala (programming language)|Scala]], [[Seed7]], [[Vala (programming language)|Vala]] | website = {{ubl|{{URL|oracle.com/java/}}|{{URL|java.com}}|{{URL|dev.java}}}} | file_ext = .java, [[Java class file|.class]], [[JAR (file format)|.jar]], .jmod, [[WAR (file format)|.war]] | wikibooks = Java Programming }} '''Java''' is a [[High-level programming language|high-level]], [[General-purpose programming language|general-purpose]], [[Memory safety|memory-safe]], [[object-oriented programming|object-oriented]] [[programming language]]. It is intended to let [[programmer]]s ''write once, run anywhere'' ([[Write once, run anywhere|WORA]]),<ref>{{cite web|title=Write once, run anywhere?|date=May 2, 2002 |publisher=[[Computer Weekly]] |url=http://www.computerweekly.com/Articles/2002/05/02/186793/write-once-run-anywhere.htm|access-date=2009-07-27|url-status=live|archive-date=August 13, 2021|archive-url=https://web.archive.org/web/20210813193857/https://www.computerweekly.com/feature/Write-once-run-anywhere}}</ref> meaning that [[compiler|compiled]] Java code can run on all platforms that support Java without the need to recompile.<ref name="design_goals">{{cite web |title=1.2 Design Goals of the Java Programming Language|date=January 1, 1999 |url=https://www.oracle.com/technetwork/java/intro-141325.html|access-date=2013-01-14|publisher=Oracle|archive-url=https://web.archive.org/web/20130123204103/http://www.oracle.com/technetwork/java/intro-141325.html|archive-date=January 23, 2013|url-status=live}}</ref> Java applications are typically compiled to [[Java bytecode|bytecode]] that can run on any [[Java virtual machine]] (JVM) regardless of the underlying [[computer architecture]]. The [[syntax (programming languages)|syntax]] of Java is similar to [[C (programming language)|C]] and [[C++]], but has fewer [[low-level programming language|low-level]] facilities than either of them. The Java runtime provides dynamic capabilities (such as [[Reflective programming|reflection]] and runtime code modification) that are typically not available in traditional compiled languages. Java gained popularity shortly after its release, and has been a popular programming language since then.<ref>{{Cite web |last=Melanson |first=Mike |date=August 9, 2022 |title=Don't call it a comeback: Why Java is still champ |url=https://github.com/readme/featured/java-programming-language |url-status=live |archive-url=https://web.archive.org/web/20230825195416/https://github.com/readme/featured/java-programming-language |archive-date=August 25, 2023 |access-date=October 15, 2023 |website=[[GitHub]]}}</ref> Java was the third most popular programming language in {{As of|2022|bare=yes}} according to [[GitHub]].<ref>{{Cite web |title=The top programming languages |url=https://octoverse.github.com/2022/top-programming-languages |url-status=live |archive-url=https://web.archive.org/web/20230802203718/https://octoverse.github.com/2022/top-programming-languages |archive-date=2 August 2023 |access-date=15 October 2023 |website=The State of the Octoverse |publisher=[[GitHub]]}}</ref> Although still widely popular, there has been a gradual decline in use of Java in recent years with [[List of JVM languages|other languages using JVM]] gaining popularity.<ref name=":0">{{cite magazine |last=McMillan |first=Robert |date=August 1, 2013 |title=Is Java Losing Its Mojo? |url=https://www.wired.com/2013/01/java-no-longer-a-favorite/ |url-access=limited |url-status=live |magazine=[[wired.com|Wired]] |archive-url=https://web.archive.org/web/20170215115409/https://www.wired.com/2013/01/java-no-longer-a-favorite/ |archive-date=February 15, 2017 |access-date=October 15, 2023 |quote=}}</ref> Java was designed by [[James Gosling]] at [[Sun Microsystems]]. It was released in May 1995 as a core component of Sun's [[Java (software platform)|Java platform]]. The original and [[reference implementation]] Java [[compiler]]s, virtual machines, and [[library (computing)|class libraries]] were released by Sun under [[proprietary license]]s. As of May 2007, in compliance with the specifications of the [[Java Community Process]], Sun had [[Software relicensing|relicensed]] most of its Java technologies under the [[GNU General Public License|GPL-2.0-only]] license. [[Oracle Corporation|Oracle]], which bought Sun in 2010, offers its own [[HotSpot (virtual machine)|HotSpot]] Java Virtual Machine. However, the official [[reference implementation]] is the [[OpenJDK]] JVM, which is open-source software used by most developers and is the default JVM for almost all Linux distributions. [[Java version history|Java 24]] is the version current {{as of|lc=y|2025|March}}. Java 8, 11, 17, and 21 are [[long-term support]] versions still under maintenance.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)