The switch Statement (The Java™ Tutorials > Learning the Java Language > Language Basics) Unlike if-then and if-then-else statements, the switch statement can have a number of possible execution paths. A switch works with the byte, short, char, and int primitive data types. It also works with enumerated types (discussed in Enum Types), the String class, and a few special classes that wrap certain primitive types: Character, Byte, Short, and Integer (discussed in Numbers and Strings). The following code example, SwitchDemo, declares an int named month whose value represents a month. In this case, August is printed to standard output. The body of a switch statement is known as a switch block. You could also display the name of the month with if-then-else statements: int month = 8; if (month == 1) { System.out.println("January"); } else if (month == 2) { System.out.println("February"); } ... // and so on Deciding whether to use if-then-else statements or a switch statement is based on readability and the expression that the statement is testing. This is the output from the code:
NetBeans The NetBeans IDE is written in Java and can run on Windows, OS X, Linux, Solaris and other platforms supporting a compatible JVM. The NetBeans Platform allows applications to be developed from a set of modular software components called modules. Applications based on the NetBeans Platform (including the NetBeans IDE itself) can be extended by third party developers.[4] The NetBeans Team actively support the product and seek future suggestions from the wider community. Every release is preceded by a time for Community testing and feedback[5] History[edit] NetBeans IDE Releases[6] NetBeans began in 1996 as Xelfi (word play on Delphi),[7][8] a Java IDE student project under the guidance of the Faculty of Mathematics and Physics at Charles University in Prague. Current versions[edit] NetBeans IDE 6.5, released in November 2008, extended the existing Java EE features (including Java Persistence support, EJB 3 and JAX-WS). NetBeans IDE 7.0 was released in April 2011. NetBeans Platform[edit]
Spring Framework The Spring Framework is an open source application framework and inversion of control container for the Java platform. The framework's core features can be used by any Java application, but there are extensions for building web applications on top of the Java EE platform. Although the framework does not impose any specific programming model, it has become popular in the Java community as an alternative to, replacement for, or even addition to the Enterprise JavaBean (EJB) model. Version history[edit] Modules[edit] The Spring Framework includes several modules that provide range of services: Inversion of control container (dependency injection)[edit] Objects created by the container are also called managed objects or beans. In many cases one need not use the container when using other parts of the Spring Framework, although using it will likely make an application easier to configure and customize. Aspect-oriented programming framework[edit] Data access framework[edit]
Préparer l'environnement nécessaire pour développer en Objective-C sous Windows NB: Ce blog est désormais transféré vers cette adresse. Objective-C est un langage de programmation orienté objet. Il est beaucoup utilisé sur Macintosh, notamment pour les API cocoa de Mac OS X et, depuis 2007, pour le développement d'applications iPhone. Toutefois, pour apprendre à développer en Objective-C, on est pas obligé de se procurer d'un Macintosh, en effet, il existe une implémentation libre du framework OpenStep (développé par Apple) appelée GNUstep, qui est, pour ainsi dire, multiplateforme et fonctionne, du coup, sous GNU/Linux et Microsoft Windows. Dans ce tutoriel, je vais vous guider à travers les étapes nécessaires pour que vous arriverez à compiler vos propres codes Objective-C sous Windows. Télécharger et installer l'environnement Rendez vous au site officiel du projet GNUstep, dans la partie Download, téléchargez l'environnement complet pour la compilation et l'exécution de GNUstep. L'environnement étant composé de 4 packages, comme montre la figure suivante : 2.
Aspect-oriented programming Programming paradigm AOP includes programming methods and tools that support the modularization of concerns at the level of the source code, while aspect-oriented software development refers to a whole engineering discipline. History[edit] Gregor Kiczales and colleagues at Xerox PARC developed the explicit concept of AOP and followed this with the AspectJ AOP extension to Java. IBM's research team pursued a tool approach over a language design approach and in 2001 proposed Hyper/J and the Concern Manipulation Environment, which have not seen wide usage. The examples in this article use AspectJ. The Microsoft Transaction Server is considered to be the first major application of AOP followed by Enterprise JavaBeans.[3][4] Motivation and basic concepts[edit] Typically, an aspect is scattered or tangled as code, making it harder to understand and maintain. For example, consider a banking application with a conceptually very simple method for transferring an amount from one account to another:[5]
Eclipse (software) The initial codebase originated from IBM VisualAge.[2] The Eclipse software development kit (SDK), which includes the Java development tools, is meant for Java developers. Users can extend its abilities by installing plug-ins written for the Eclipse Platform, such as development toolkits for other programming languages, and can write and contribute their own plug-in modules. Released under the terms of the Eclipse Public License, Eclipse SDK is free and open source software (although it is incompatible with the GNU General Public License[3]). It was one of the first IDEs to run under GNU Classpath and it runs without problems under IcedTea. Eclipse began as a Smart Canada project. Eclipse 3.0 (released on 21 June 2004) selected the OSGi Service Platform specifications as the runtime architecture.[8] The Association for Computing Machinery recognized Eclipse with the 2011 ACM Software Systems Award on 26 April 2012.[9] Legend: Old version Older version, still supported Latest version
Connecting to a MySQL Database This document demonstrates how to set up a connection to a MySQL database from the NetBeans IDE. Once connected, you can begin working with MySQL in the IDE's Database Explorer by creating new databases and tables, populating tables with data, and running SQL queries on database structures and content. This tutorial is designed for beginners with a basic understanding of database management, who want to apply their knowledge to working with MySQL in NetBeans IDE. MySQL is a popular Open Source relational database management system (RDBMS) commonly used in web applications due to its speed, flexibility and reliability. Expected duration: 30 minutes Contents To follow this tutorial, you need the following software and resources. Note: This tutorial assumes that you already have the MySQL RDBMS installed and configured on your computer. Configuring MySQL Server Properties NetBeans IDE comes bundled with support for the MySQL RDBMS. Starting the MySQL Server Creating Database Tables See Also
New NetBeans, Java EE, and HTML5 Book Adding to several new books related to NetBeans, here's another one, which I received in a box of 10 yesterday, as one of its co-authors, together with JB Brock and Arun Gupta. Build and distribute business web applications that target both desktop and mobile devices. Cowritten by Java EE and NetBeans IDE experts, Java EE and HTML5 Enterprise Application Development fully explains cutting-edge, highly responsive design tools and strategies. Find out how to navigate NetBeans IDE, construct HTML5 programs, employ JavaScript APIs, integrate CSS and WebSockets, and handle security. This Oracle Press guide also offers practical coverage of SaaS, MVVM, and RESTful concepts. Get it here on Amazon.com.
SpringSource.org Archimedes Archimedes of Syracuse (Greek: Ἀρχιμήδης; c. 287 BC – c. 212 BC) was a Greek mathematician, physicist, engineer, inventor, and astronomer.[1] Although few details of his life are known, he is regarded as one of the leading scientists in classical antiquity. Among his advances in physics are the foundations of hydrostatics, statics and an explanation of the principle of the lever. He is credited with designing innovative machines, including siege engines and the screw pump that bears his name. Unlike his inventions, the mathematical writings of Archimedes were little known in antiquity. Biography Archimedes was born c. 287 BC in the seaport city of Syracuse, Sicily, at that time a self-governing colony in Magna Graecia, located along the coast of Southern Italy. Archimedes died c. 212 BC during the Second Punic War, when Roman forces under General Marcus Claudius Marcellus captured the city of Syracuse after a two-year-long siege. Discoveries and inventions Archimedes' principle Heat ray
Java 7: Project Coin in code examples This blog introduces - by code examples - some new Java 7 features summarized under the term Project Coin. The goal of Project Coin is to add a set of small language changes to JDK 7. These changes do simplify the Java language syntax. Less typing, cleaner code, happy developer ;-) Let's look into that. Prerequisites Install Java 7 SDK on your machine Install Eclipse Indigo 3.7.1 You need to look out for the correct bundles for your operating system. In your Eclipse workspace you need to define the installed Java 7 JDK in your runtime. Next you need to set the compiler level to 1.7 in Java > Compiler. Project Coin Improved literals A literal is the source code representation of a fixed value. "In Java SE 7 and later, any number of underscore characters (_) can appear anywhere between digits in a numerical literal. Notice the underscores in the literals (e.g. 1234_5678_9012_3456L). With underscores: 1234567890123456 -764832622 Without underscores: 1234567890123456 -764832622 SafeVarargs Diamond