2 Egon Borger, Wolfram Schulte: Initialization Problems for Java 1 class A implements I{ } 2 3 interface I { static boolean dummy = Main.sideeffect =

Size: px
Start display at page:

Download "2 Egon Borger, Wolfram Schulte: Initialization Problems for Java 1 class A implements I{ } 2 3 interface I { static boolean dummy = Main.sideeffect ="

Transcription

1 Initialization Problems for Java? Egon Borger 1, Wolfram Schulte 2 1 Universita di Pisa, Dipartimento di Informatica, I Pisa, Italy, boerger@di.unipi.it 2 Universitat Ulm, Fakultat fur Informatik, D Ulm, Germany, wolfram@informatik.uni-ulm.de Abstract. We exhibit a grey area in the specication of Java and of its implementation through the Java Virtual Machine (JVM): the treatment of initialization of classes and interfaces. We report the result of our experiments with dierent implementations of Java, which conrm the theoretical prediction of our work on mathematical models for Java [4] and the JVM [3], namely that the designers of Java and the JVM have used notions of initialization which do not match and which aict the portability of Java programs. We show also that concurrent initialization may deadlock and that various current Java compilers violate the initialization semantics through standard optimization techniques. Key words: Programming language { Java { Virtual machine { Compiler 1 The Initialization Problem Any programming language that supports libraries of autonomous components has to determine when to initialize a library component. Examples of components are modules, packages or classes. In traditional block oriented languages, like Pascal, C or C++, a global variable is associated with the initialization status of a component. This variable is initialized in the main program. However, this does not work for modern object-oriented languages like Eiel or Java. By denition they do not have a main program. Additionally, Java's support for dynamic class loading requires that initialization should be lazy, that is, it should take place just before a rst use of any item declared in a class. An additional complication is caused by parallel threads that try to initialize the same class at the same time.? This paper appears in Software { Concepts & Tools. Vol. 20, No. 4, Through two recent studies, where we provide a mathematical denition of the meaning of Java [4] and prove a natural scheme for compilation of Java on the Java Virtual Machine (JVM) to be correct [3], we discovered the following problems with initialization in Java and its implementations: { The exact moment when initializers for static elds in interfaces are executed is underspecied in the Java Language Specication (JLS) [6]. They can either be initialized when an interface eld is rst used, or when a class (an interface) that implements (extends) the interface is initialized. { The JLS and the JVM Specication (JVMS) [7] use semantically dierent and conicting concepts to de- ne when a class or interface is initialized. Whereas the JLS uses the concept of rst active use to trigger class or interface initialization, the JVM implements the initialization as a mandatory step of its (constant pool) resolution process. This process, however, is also triggered for instructions whose execution does not constitute rst active uses. { Concurrent initialization in Java may deadlock. If two threads initialize two dierent classes concurrently and both threads detect a rst active use of a component of the other class, then both threads become blocked, because they both wait that the respective other thread nishes its initialization. { Most Java compilers are awed, because their optimizations do not preserve the initialization semantics of a class or an interface. As a consequence programs with static initializers or initializers for static elds that have side eects, for example, perform input/output, assign non inherited class elds or throw exceptions, behave nondeterministically in unspecied ways. This behavior is inconsistent with Java's strive for portability.

2 2 Egon Borger, Wolfram Schulte: Initialization Problems for Java 1 class A implements I{ } 2 3 interface I { static boolean dummy = Main.sideeffect = true; } 4 5 class Main{ 6 static boolean sideeffect=false; 7 8 public static void main(string[] args){ 9 A a = new A(); 10 System.out.println("Side effect happened: " + sideeffect); 11 } } Fig. 1. The execution of the program Main shows whether the interface I is initialized when the implementing class A is initialized. 2 Initialization is Underspecied The JLS leaves an amount of implementation freedom for initialization, which is incompatible with the portability of programs. The JLS says that the superinterfaces of a class or of an interface need not be initialized before a class or an interface is initialized [6, x ]. They can be initialized, but their initialization is not required. Starting from our models for Java [4] and for the JVM [3] one can provide dierent renements that are compatible with the requirements of the JLS but yield dierent results for interface initialization. Experimentation with current implementations conrms this: Figure 1 shows the application Main, which execution in dierent implementations leads to dierent results due to this underspecication of interface initialization. Sun's Java Development Kit (JDK) 1.1 running the application Main on several platforms initializes the interface; the respective JVM prints Side effect happened : true. 1 On the other hand IBM's Visual Age 1.0 for Java running Main on Windows or Netscape 3.0 running the corresponding applet on Solaris do not initialize the interface, i.e. they print Side effect happened : false. Even the main vendors of Java (machines) implement the initialization strategy dierently, which obviously contradicts portability. Table 1 shows the interface initialization behavior of dierent implementations. 3 Initialization is Ambiguous Initialization in Java is based on the concept of rst active use: if a constructor or a member of a class is used, the class must be initialized. 2 On the level of the JVM initialization is triggered by constant pool resolution [7, x 5]. The constant pool plays 1 It has been pointed out to us by G. Attardi that in JDK 1.2 for Solaris of Sun our program is not initialized anymore. 2 With respect to the JLS [6, x ] this description is slightly simplied, however, for our purposes it suces. For a more rigorous and complete denition see also [4]. the role of a symbol table. JVM instructions that take classes, interfaces, elds or methods as operands, reference these entities symbolically using the constant pool. At runtime the symbolic reference is checked whether the denoted entity has been successfully loaded, linked and initialized and otherwise loading, linking and initializing it. Next, it is checked whether the access to the resolved item is granted. In case both checks are passed, the symbolic reference is translated into a concrete reference to a runtime data structure. The JLS and the JVMS initialization descriptions dier: Since the JVM checkcast and instanceof instructions reference classes or interfaces, execution of these instructions require constant pool resolution, possibly initializing the referenced type. Yet, the corresponding Java phrases, namely the reference type cast expression and the instanceof operator, are not active uses in Java. These expressions do not trigger the initialization of the referenced types. This inconsistency can be traced in our rigorous models for Java [4] and the JVM [3] as platform for compiling Java code. The inconsistency is experimentally demonstrated by slightly changing application Main of Fig. 1. We extend the class A (in line 1) by a static method someobject that returns a new instance of class A. Additionally, we change line 9, so that it tries to cast null or the result of the someobject method invocation to the interface I. 3 1 class A implements I { static Object someobject(){ return new A();} } 9 I i = (I) (args.length==0? null : A.someObject()); Sun's JDK 1.1 follows the JVM description. The application of the checkcast operation with operand I triggers I's initialization and prints Side effect 3 The statement I i = (I) null; would expose the same problem. However, several compilers eliminate the cast, which mixes up the experiment.

3 Egon Borger, Wolfram Schulte: Initialization Problems for Java 3 Toolkit JDK 1.1 MS J Platform diverse Windows IBM Java 1.0 Windows Borland JBuilder 1.0 Windows Netscape 3/4 Apple Appletrunner MS Explorer 3.0 diverse Mac OS Windows Underspecied Eager Eager Lazy Eager Lazy 4 Eager Eager Ambigous JVM JVM Java JVM JVM JVM JVM Correct No Yes No No { { { Table 1. Behavior of dierent Java/JVM implementations. The row `Underspecied' shows whether an interface is initialized lazy or eager. The row `Ambigous' shows whether the implementation uses Java or JVM semantics for initialization. The row `Correct' shows whether compiler optimizations respect the point of initialization. happened : true. However, according to the Java semantics the output should be Side effect happened : false, because the cast to I is not a rst active use. In fact, this is what IBM Visual Age 1.0 running on Windows produces. Both implementations behave dierently, yet both are right but on dierent levels. Table 1 describes the behavior of our program for several dierent systems. A similar problem arises in the context of array creation expressions. Whereas the JLS [6, x ] denes that in an array creation expression the array's base type is initialized, this is left out in the JVMS [7, x ]. But on the other hand constant pool resolution requires the initialization of the base type of any referenced array [7, x 5.1.3]. As a consequence, most implementations trigger class resolution in array creation expressions, an exception is Visual Age 1.0 on Windows. Another ambiguity appears, if a class initializer raises an exception that is not handled within the method. In this case the JLS [6, x ] and the JVMS [6, x ] require that the method's class must be labeled as erroneous. If the thrown exception is not an Error or one of its subclasses, then an ExceptionInInitializerError is thrown instead of the error. 5 If a class should be initialized or should be resolved but is already marked as erroneous, Java and the JVM require that a NoClassDefFoundError is reported. Experimentation, however, conrms only the following: If a class is not found for the rst n uses of the class, then n NoClassDefFoundErrors are thrown. But if rst an ExceptionInInitializerError is thrown, then in most implementations (e.g. the JDK 1.1) successive uses of the class do not throw NoClassDefFoundErrors. Although the class is in an inconsistent state, the class is accessed. This behavior contradicts the language and machine specication as well as our models [3, 4]. 4 Netscape 3 initializes the interface lazily, whereas Netscape 4 does it eagerly. 5 An ExceptionInInitializerError is a subclass of RuntimeException as specied in [6, x 20.23] and not a subclass of Error as specied in the introduction to chapter 20 in [6]. 4 Optimization May Go Wrong Several compilers do not preserve the semantics of initialization. This can be demonstrated experimentally by slightly changing Main of Sect. 3. We replace the call of A:someObject in line 9 by the body of the method someobject declared in class A. 9 I i = (I) (args.length==0? null : new A()); According to the Java semantics (see [6]), which is reected in our model [4], this change should have no eect. However, most compilers deduce that the type of the conditional expression is either A or the null type. In both cases the reference type cast to the interface I will succeed and so most compilers eliminate it (see Table 1). According to the JLS this is correct, but it is inconsistent with the use of resolution. Note, that some compilers also eliminate \redundant" phrases like dead = instance.field, where dead is, at the point where the phrase appears, never subsequently used. This transformation is only correct, provided the class of the instance is already resolved. However, in general this cannot be statically decided. Indeed, most aforementioned compilers do not preserve the semantics of initialization under all circumstances. An exception might be Microsoft J++, for which we did not nd a negative test case. The language designers of Java have foreseen this problem (cf. [6, x ]). Nevertheless, we found this compiler error interesting to note, since this kind of error is typical for subtle errors involving implicit actions and side eects. 5 Initialization May Deadlock Java supports concurrency. Concurrent initialization is dicult because several threads may be trying to initialize a class at the same time. Java proposes the following strategy [6, x ]: When initialization of a class is in progress by some thread, then other threads that

4 4 Egon Borger, Wolfram Schulte: Initialization Problems for Java 1 class A { 5 class B { 2 static char a = 'a'; 6 static char b = 'b'; 3 static { a = B.b;} 7 static { b = A.a;} 4 } 8 } Fig. 2. Concurrent execution of the static initializers of classes A and B may deadlock. also want to initialize the class have to wait until initialization of the class is done or an error occurs. In both cases all waiting threads have to be awaked by the active thread. Awaked threads check the initialization status of the class. If initialization was successful the awaked thread immediately returns, if initialization failed an exception is thrown. This behavior of Java is formalized in our model Java T [4]. Now consider the problem that there are two classes A and B, which static initializer depend on each other (see Fig. 2 for the example). The result of executing these initializers is dependent on the thread scheduler. If a single thread executes both initializers and if the thread has rst entered the static initializer of A, then A.a and B.b are set to 'a'; if the thread has rst entered the static initializer of B, then both class variables are set to 'b'. However, if two threads concurrently enter the static initializers, then as can be checked in our model [4] for Java both will detect a rst use of the respective other class. But since the initialization of the other class is in progress by the respective other thread, both start waiting, but no thread will awake them. This is a typical deadlock. This deadlock, however, is not visible for the programmer. He has not used any synchronization mechanism. This usually means that the result of a computation may be nondeterministic, but there is always progress. Another complication arises from the fact that it is the thread scheduler who is actually responsible for running the threads in parallel. If the scheduler switches between runnable threads during initialization, the program might deadlock. If the scheduler does not switch, the program makes progress. The implementation of the thread scheduling, however, is up to the vendor and can usually not be inuenced by the programmer. As predicted by our mathematical model for Java, dierent implementations (e.g. the JDK 1.1) deadlock. 6 Discussion and Proposal of Solution Mostly the analysis of Java is concentrated on nding security errors. Work in this area can be classied as experimental, for instance [9, 10], or theoretical, for instance [1, 11]. To simplify the formal analysis, none of these theoretical studies does care about initialization and as a consequence none of them did detect Java's initialization problems. In their descriptions of defensive JVMs Bertelsen [2] and Cohen [5] noticed the problems of underspecication and ambiguity. However, their observations were never conrmed. Perara and Bertelsen maintain an on-line list of errors, ommissions, and ambiguities of the JLS and the JVMS [8]. There is a simple solution to the initialization problem: Programmers should strive for initializations that only read or write inherited variables. (This check could easily be integrated into the Java compiler as well as the bytecode verier.) In case one has to read or write non inherited variables, for example to open a network connection, an extra method should be used to encapsulate the eect, and must be called outside of a static initializer or an initializer of a static eld. 6 The designers of the Java language should eliminate the underspecication of interface initialization and should agree with the designers of the JVM on the used concept for when classes are initialized. Finally, compiler writers should implement the specication correctly. Acknowledgements. We thank G. Attardi, P. Bertelsen, C. Pusch, J. Schmid, T. Thorn, and T. Vullinghs for valuable comments on the draft of this paper. References 1. J. Alves-Foss, editor. Formal Syntax and Semantics of Java(tm). Springer LNCS, to appear P. Bertelsen. Semantics of Java byte code. Ftp at: ftp://ftp.dina.kvl.dk/pub/sta/peter.bertelsen/jvmsemantics.ps.gz, E. Borger and W. Schulte. Dening the Java Virtual Machine as platform for provably correct Java compilation. In L. Brim, J. Gruska, and J. Zlatuska, editors, MFCS'98, Springer LNCS 1450, E. Borger and W. Schulte. A programmer friendly modular denition of the semantics of Java. In Alves-Foss [1]. 5. R. M. Cohen. Defensive Java virtual machine version 0.5 alpha release. Web pages at: http: // J. Gosling, B. Joy, and G. Steele. The Java(tm) Language Specication. Addison Wesley, One could develop weaker constraints, for example that the dependency relation between classes, established by the use of variables in static initializers and initializers for static elds, must be acyclic. However, this would complicate compile-time checking as well as bytecode verication.

5 Egon Borger, Wolfram Schulte: Initialization Problems for Java 5 7. T. Lindholm and F. Yellin. The Java(tm) Virtual Machine Specication. Addison Wesley, R. Perera and P. Bertelsen. Java spec report. Web pages at: V. Saraswat. Java is not type-safe. Web pages at: E.G. Sirer, S. McDirmid, and B. Bershad. Kimera: A Java system security architecture. Web pages at: R. Stata and M. Abadi. A type system for Java bytecode subroutines. In Proceedings of the 25th Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 1998.

C. E. McDowell August 25, Baskin Center for. University of California, Santa Cruz. Santa Cruz, CA USA. abstract

C. E. McDowell August 25, Baskin Center for. University of California, Santa Cruz. Santa Cruz, CA USA. abstract Unloading Java Classes That Contain Static Fields C. E. McDowell E. A. Baldwin 97-18 August 25, 1997 Baskin Center for Computer Engineering & Information Sciences University of California, Santa Cruz Santa

More information

Natural Semantics [14] within the Centaur system [6], and the Typol formalism [8] which provides us with executable specications. The outcome of such

Natural Semantics [14] within the Centaur system [6], and the Typol formalism [8] which provides us with executable specications. The outcome of such A Formal Executable Semantics for Java Isabelle Attali, Denis Caromel, Marjorie Russo INRIA Sophia Antipolis, CNRS - I3S - Univ. Nice Sophia Antipolis, BP 93, 06902 Sophia Antipolis Cedex - France tel:

More information

Java and the Java Virtual Machine

Java and the Java Virtual Machine Java and the Java Virtual Machine Definition, Verification, Validation Robert Stärk, Joachim Schmid, Egon Börger June 7, 2001 The introduction of Jbook. This document is t for distribution. The Home-Page

More information

CSE P 501 Compilers. Java Implementation JVMs, JITs &c Hal Perkins Winter /11/ Hal Perkins & UW CSE V-1

CSE P 501 Compilers. Java Implementation JVMs, JITs &c Hal Perkins Winter /11/ Hal Perkins & UW CSE V-1 CSE P 501 Compilers Java Implementation JVMs, JITs &c Hal Perkins Winter 2008 3/11/2008 2002-08 Hal Perkins & UW CSE V-1 Agenda Java virtual machine architecture.class files Class loading Execution engines

More information

void f() { try { something(); } finally { done(); } } Figure 1: A method using a try-finally statement. system developed by Stata and Abadi [SA98a]. E

void f() { try { something(); } finally { done(); } } Figure 1: A method using a try-finally statement. system developed by Stata and Abadi [SA98a]. E The Costs and Benets of Java Bytecode Subroutines Stephen N. Freund Department of Computer Science Stanford University Stanford, CA 94305-9045 freunds@cs.stanford.edu September 20, 1998 Abstract Java bytecode

More information

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS PAUL L. BAILEY Abstract. This documents amalgamates various descriptions found on the internet, mostly from Oracle or Wikipedia. Very little of this

More information

The Sun s Java Certification and its Possible Role in the Joint Teaching Material

The Sun s Java Certification and its Possible Role in the Joint Teaching Material The Sun s Java Certification and its Possible Role in the Joint Teaching Material Nataša Ibrajter Faculty of Science Department of Mathematics and Informatics Novi Sad 1 Contents Kinds of Sun Certified

More information

Programming. Syntax and Semantics

Programming. Syntax and Semantics Programming For the next ten weeks you will learn basic programming principles There is much more to programming than knowing a programming language When programming you need to use a tool, in this case

More information

of Fig. 2 contains a common Java idiom. The circularity in this example class Widget { static int nextserialnumber = int serialnumber static Wid

of Fig. 2 contains a common Java idiom. The circularity in this example class Widget { static int nextserialnumber = int serialnumber static Wid Eager Class Initialization for Java Dexter Kozen 1 and Matt Stillerman 2 1 Computer Science Department, Cornell University, Ithaca, NY 14853-7501, USA kozen@cs.cornell.edu 2 ATC-NY, 33 Thornwood Drive,

More information

Agenda. CSE P 501 Compilers. Java Implementation Overview. JVM Architecture. JVM Runtime Data Areas (1) JVM Data Types. CSE P 501 Su04 T-1

Agenda. CSE P 501 Compilers. Java Implementation Overview. JVM Architecture. JVM Runtime Data Areas (1) JVM Data Types. CSE P 501 Su04 T-1 Agenda CSE P 501 Compilers Java Implementation JVMs, JITs &c Hal Perkins Summer 2004 Java virtual machine architecture.class files Class loading Execution engines Interpreters & JITs various strategies

More information

Java for Programmers Course (equivalent to SL 275) 36 Contact Hours

Java for Programmers Course (equivalent to SL 275) 36 Contact Hours Java for Programmers Course (equivalent to SL 275) 36 Contact Hours Course Overview This course teaches programmers the skills necessary to create Java programming system applications and satisfies the

More information

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS Chapter 1 : Chapter-wise Java Multiple Choice Questions and Answers Interview MCQs Java Programming questions and answers with explanation for interview, competitive examination and entrance test. Fully

More information

THE IMPLEMENTATION OF A DISTRIBUTED FILE SYSTEM SUPPORTING THE PARALLEL WORLD MODEL. Jun Sun, Yasushi Shinjo and Kozo Itano

THE IMPLEMENTATION OF A DISTRIBUTED FILE SYSTEM SUPPORTING THE PARALLEL WORLD MODEL. Jun Sun, Yasushi Shinjo and Kozo Itano THE IMPLEMENTATION OF A DISTRIBUTED FILE SYSTEM SUPPORTING THE PARALLEL WORLD MODEL Jun Sun, Yasushi Shinjo and Kozo Itano Institute of Information Sciences and Electronics University of Tsukuba Tsukuba,

More information

1 Shyam sir JAVA Notes

1 Shyam sir JAVA Notes 1 Shyam sir JAVA Notes 1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write

More information

On a New Method for Dataow Analysis of Java Virtual Machine Subroutines Masami Hagiya and Akihiko Tozawa Department of Information Science, Graduate S

On a New Method for Dataow Analysis of Java Virtual Machine Subroutines Masami Hagiya and Akihiko Tozawa Department of Information Science, Graduate S On a New Method for Dataow Analysis of Java Virtual Machine Subroutines Masami Hagiya (corresponding author) and Akihiko Tozawa Department of Information Science, Graduate School of Science, University

More information

Selected Java Topics

Selected Java Topics Selected Java Topics Introduction Basic Types, Objects and Pointers Modifiers Abstract Classes and Interfaces Exceptions and Runtime Exceptions Static Variables and Static Methods Type Safe Constants Swings

More information

proc {Produce State Out} local State2 Out2 in State2 = State + 1 Out = State Out2 {Produce State2 Out2}

proc {Produce State Out} local State2 Out2 in State2 = State + 1 Out = State Out2 {Produce State2 Out2} Laziness and Declarative Concurrency Raphael Collet Universite Catholique de Louvain, B-1348 Louvain-la-Neuve, Belgium raph@info.ucl.ac.be May 7, 2004 Abstract Concurrency and distribution in a programming

More information

1 Background Based on a general background in programming language semantics (cf. [PH97a]) and its relation to programming logics, we investigated the

1 Background Based on a general background in programming language semantics (cf. [PH97a]) and its relation to programming logics, we investigated the Developing Provably Correct Programs From Object-Oriented Components Peter Muller Fachbereich Informatik, Fernuniversitat Feithstr. 140, 58084 Hagen, Germany Tel: (++49 2331) 987-4870 Email: Peter.Mueller@fernuni-hagen.de

More information

that programs might be downloaded and executed without users realizing that this is happening. Users are keen to take advantage of the new functionali

that programs might be downloaded and executed without users realizing that this is happening. Users are keen to take advantage of the new functionali The Functions of Java Bytecode Mark P. Jones Languages and Programming, Department of Computer Science University of Nottingham, Nottingham NG7 2RD, England. http://www.cs.nott.ac.uk/~ mpj/ Abstract Java

More information

Do! environment. DoT

Do! environment. DoT The Do! project: distributed programming using Java Pascale Launay and Jean-Louis Pazat IRISA, Campus de Beaulieu, F35042 RENNES cedex Pascale.Launay@irisa.fr, Jean-Louis.Pazat@irisa.fr http://www.irisa.fr/caps/projects/do/

More information

SAMOS: an Active Object{Oriented Database System. Stella Gatziu, Klaus R. Dittrich. Database Technology Research Group

SAMOS: an Active Object{Oriented Database System. Stella Gatziu, Klaus R. Dittrich. Database Technology Research Group SAMOS: an Active Object{Oriented Database System Stella Gatziu, Klaus R. Dittrich Database Technology Research Group Institut fur Informatik, Universitat Zurich fgatziu, dittrichg@ifi.unizh.ch to appear

More information

COMPOSABILITY, PROVABILITY, REUSABILITY (CPR) FOR SURVIVABILITY

COMPOSABILITY, PROVABILITY, REUSABILITY (CPR) FOR SURVIVABILITY AFRL-IF-RS-TR-2002-61 Final Technical Report April 2002 COMPOSABILITY, PROVABILITY, REUSABILITY (CPR) FOR SURVIVABILITY Kestrel Institute Sponsored by Defense Advanced Research Projects Agency DARPA Order

More information

Special Topics: Programming Languages

Special Topics: Programming Languages Lecture #23 0 V22.0490.001 Special Topics: Programming Languages B. Mishra New York University. Lecture # 23 Lecture #23 1 Slide 1 Java: History Spring 1990 April 1991: Naughton, Gosling and Sheridan (

More information

Egon Borger (Pisa) Capturing Design Pattern Abstractions by ASMs

Egon Borger (Pisa) Capturing Design Pattern Abstractions by ASMs Egon Borger (Pisa) Capturing Design Pattern Abstractions by ASMs Universita di Pisa, Dipartimento di Informatica, I-56127 Pisa, Italy boerger@di.unipi.it visiting SAP Research, Karlsruhe, Germany egon.boerger@sap.com

More information

Operators and Expressions

Operators and Expressions Operators and Expressions Conversions. Widening and Narrowing Primitive Conversions Widening and Narrowing Reference Conversions Conversions up the type hierarchy are called widening reference conversions

More information

A Run-time Assertion Checker for Java using JML

A Run-time Assertion Checker for Java using JML Computer Science Technical Reports Computer Science 5-1-2000 A Run-time Assertion Checker for Java using JML Abhay Bhorkar Follow this and additional works at: http://lib.dr.iastate.edu/cs_techreports

More information

When Java technology burst onto the Internet scene in 1995,

When Java technology burst onto the Internet scene in 1995, MOBILE CODE SECURITY SECURE JAVA CLASS LOADING The class loading mechanism, LI GONG Sun Microsystems central to Java, plays a key role in JDK 1.2 by enabling When Java technology burst onto the Internet

More information

Synchronization SPL/2010 SPL/20 1

Synchronization SPL/2010 SPL/20 1 Synchronization 1 Overview synchronization mechanisms in modern RTEs concurrency issues places where synchronization is needed structural ways (design patterns) for exclusive access 2 Overview synchronization

More information

Problems of Bytecode Verification

Problems of Bytecode Verification Eidgenossische Technische Hochschule Zurich Ecole polytechnique federale de Zurich Politecnico federale di Zurigo Swiss Federal Institute of Technology Zurich Problems of Bytecode Verification Robert F.

More information

Atelier Java - J1. Marwan Burelle. EPITA Première Année Cycle Ingénieur.

Atelier Java - J1. Marwan Burelle.  EPITA Première Année Cycle Ingénieur. marwan.burelle@lse.epita.fr http://wiki-prog.kh405.net Plan 1 2 Plan 3 4 Plan 1 2 3 4 A Bit of History JAVA was created in 1991 by James Gosling of SUN. The first public implementation (v1.0) in 1995.

More information

Late-bound Pragmatical Class Methods

Late-bound Pragmatical Class Methods Late-bound Pragmatical Class Methods AXEL SCHMOLITZKY, MARK EVERED, J. LESLIE KEEDY, GISELA MENGER Department of Computer Structures University of Ulm 89069 Ulm, Germany {axel, markev, keedy, gisela@informatik.uni-ulm.de

More information

A COMPARISON OF EAGER AND LAZY CLASS INITIALIZATION IN JAVA

A COMPARISON OF EAGER AND LAZY CLASS INITIALIZATION IN JAVA A COMPARISON OF EAGER AND LAZY CLASS INITIALIZATION IN JAVA STANISLAW M. DZIOBIAK Abstract. We prove that under some natural condition eager class initialization of a Java program P, as proposed in [3],

More information

Chapter 6 Introduction to Defining Classes

Chapter 6 Introduction to Defining Classes Introduction to Defining Classes Fundamentals of Java: AP Computer Science Essentials, 4th Edition 1 Objectives Design and implement a simple class from user requirements. Organize a program in terms of

More information

As related works, OMG's CORBA (Common Object Request Broker Architecture)[2] has been developed for long years. CORBA was intended to realize interope

As related works, OMG's CORBA (Common Object Request Broker Architecture)[2] has been developed for long years. CORBA was intended to realize interope HORB: Distributed Execution of Java Programs HIRANO Satoshi Electrotechnical Laboratory and RingServer Project 1-1-4 Umezono Tsukuba, 305 Japan hirano@etl.go.jp http://ring.etl.go.jp/openlab/horb/ Abstract.

More information

Single-pass Static Semantic Check for Efficient Translation in YAPL

Single-pass Static Semantic Check for Efficient Translation in YAPL Single-pass Static Semantic Check for Efficient Translation in YAPL Zafiris Karaiskos, Panajotis Katsaros and Constantine Lazos Department of Informatics, Aristotle University Thessaloniki, 54124, Greece

More information

1 Introduction One of the contributions of Java is in its bytecode verier, which checks type safety of bytecode for JVM (Java Virtual Machine) prior t

1 Introduction One of the contributions of Java is in its bytecode verier, which checks type safety of bytecode for JVM (Java Virtual Machine) prior t On a New Method for Dataow Analysis of Java Virtual Machine Subroutines Masami Hagiya Department of Information Science, Graduate School of Science, University of Tokyo hagiyais.s.u-tokyo.ac.jp Abstract

More information

Instrumentation of Java Bytecode for Runtime Analysis

Instrumentation of Java Bytecode for Runtime Analysis Instrumentation of Java Bytecode for Runtime Analysis Allen Goldberg and Klaus Havelund Kestrel Technology, NASA Ames Research Center Moffett Field, MS 269-3, California USA Phone: 650-604-4858, Email:

More information

Global Scheduler. Global Issue. Global Retire

Global Scheduler. Global Issue. Global Retire The Delft-Java Engine: An Introduction C. John Glossner 1;2 and Stamatis Vassiliadis 2 1 Lucent / Bell Labs, Allentown, Pa. 2 Delft University oftechnology, Department of Electrical Engineering Delft,

More information

A.java class A f void f() f... g g - Java - - class file Compiler > B.class network class file A.class Java Virtual Machine Loa

A.java class A f void f() f... g g - Java - - class file Compiler > B.class network class file A.class Java Virtual Machine Loa A Type System for Object Initialization In the Java TM Bytecode Language Stephen N. Freund John C. Mitchell Department of Computer Science Stanford University Stanford, CA 94305-9045 ffreunds, mitchellg@cs.stanford.edu

More information

Java 2 Programmer Exam Cram 2

Java 2 Programmer Exam Cram 2 Java 2 Programmer Exam Cram 2 Copyright 2003 by Que Publishing International Standard Book Number: 0789728613 Warning and Disclaimer Every effort has been made to make this book as complete and as accurate

More information

Java Internals. Frank Yellin Tim Lindholm JavaSoft

Java Internals. Frank Yellin Tim Lindholm JavaSoft Java Internals Frank Yellin Tim Lindholm JavaSoft About This Talk The JavaSoft implementation of the Java Virtual Machine (JDK 1.0.2) Some companies have tweaked our implementation Alternative implementations

More information

Lecture 1: Overview of Java

Lecture 1: Overview of Java Lecture 1: Overview of Java What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++ Designed for easy Web/Internet applications Widespread

More information

Autolink. A Tool for the Automatic and Semi-Automatic Test Generation

Autolink. A Tool for the Automatic and Semi-Automatic Test Generation Autolink A Tool for the Automatic and Semi-Automatic Test Generation Michael Schmitt, Beat Koch, Jens Grabowski and Dieter Hogrefe University of Lubeck, Institute for Telematics, Ratzeburger Allee 160,

More information

Chapter 1: Introduction to Computers and Java

Chapter 1: Introduction to Computers and Java Chapter 1: Introduction to Computers and Java Starting Out with Java: From Control Structures through Objects Fifth Edition by Tony Gaddis Chapter Topics Chapter 1 discusses the following main topics:

More information

B2.52-R3: INTRODUCTION TO OBJECT ORIENTATED PROGRAMMING THROUGH JAVA

B2.52-R3: INTRODUCTION TO OBJECT ORIENTATED PROGRAMMING THROUGH JAVA B2.52-R3: INTRODUCTION TO OBJECT ORIENTATED PROGRAMMING THROUGH JAVA NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE

More information

8/23/2014. Chapter Topics. Introduction. Java History. Why Program? Java Applications and Applets. Chapter 1: Introduction to Computers and Java

8/23/2014. Chapter Topics. Introduction. Java History. Why Program? Java Applications and Applets. Chapter 1: Introduction to Computers and Java Chapter 1: Introduction to Computers and Java Starting Out with Java: From Control Structures through Objects Fifth Edition by Tony Gaddis Chapter Topics Chapter 1 discusses the following main topics:

More information

Objectives. Problem Solving. Introduction. An overview of object-oriented concepts. Programming and programming languages An introduction to Java

Objectives. Problem Solving. Introduction. An overview of object-oriented concepts. Programming and programming languages An introduction to Java Introduction Objectives An overview of object-oriented concepts. Programming and programming languages An introduction to Java 1-2 Problem Solving The purpose of writing a program is to solve a problem

More information

A Short Summary of Javali

A Short Summary of Javali A Short Summary of Javali October 15, 2015 1 Introduction Javali is a simple language based on ideas found in languages like C++ or Java. Its purpose is to serve as the source language for a simple compiler

More information

Institut fur Informatik, Universitat Klagenfurt. Institut fur Informatik, Universitat Linz. Institut fur Witschaftsinformatik, Universitat Linz

Institut fur Informatik, Universitat Klagenfurt. Institut fur Informatik, Universitat Linz. Institut fur Witschaftsinformatik, Universitat Linz Coupling and Cohesion in Object-Oriented Systems Johann Eder (1) Gerti Kappel (2) Michael Schre (3) (1) Institut fur Informatik, Universitat Klagenfurt Universitatsstr. 65, A-9020 Klagenfurt, Austria,

More information

Outline. Introduction to Java. What Is Java? History. Java 2 Platform. Java 2 Platform Standard Edition. Introduction Java 2 Platform

Outline. Introduction to Java. What Is Java? History. Java 2 Platform. Java 2 Platform Standard Edition. Introduction Java 2 Platform Outline Introduction to Java Introduction Java 2 Platform CS 3300 Object-Oriented Concepts Introduction to Java 2 What Is Java? History Characteristics of Java History James Gosling at Sun Microsystems

More information

Resolving of Intersection Types in Java

Resolving of Intersection Types in Java Resolving of Intersection Types in Java Martin Plümicke University of Cooperative Education Stuttgart Department of Information Technology Florianstraße 15, D 72160 Horb m.pluemicke@ba-horb.de Abstract.

More information

VM instruction formats. Bytecode translator

VM instruction formats. Bytecode translator Implementing an Ecient Java Interpreter David Gregg 1, M. Anton Ertl 2 and Andreas Krall 2 1 Department of Computer Science, Trinity College, Dublin 2, Ireland. David.Gregg@cs.tcd.ie 2 Institut fur Computersprachen,

More information

CSC System Development with Java. Exception Handling. Department of Statistics and Computer Science. Budditha Hettige

CSC System Development with Java. Exception Handling. Department of Statistics and Computer Science. Budditha Hettige CSC 308 2.0 System Development with Java Exception Handling Department of Statistics and Computer Science 1 2 Errors Errors can be categorized as several ways; Syntax Errors Logical Errors Runtime Errors

More information

Data Abstraction: The Walls

Data Abstraction: The Walls Chapter 4 Data Abstraction: The Walls 2011 Pearson Addison-Wesley. All rights reserved 4-1 Abstract Data Types Modularity Keeps the complexity of a large program manageable by systematically controlling

More information

A Type System for Object Initialization In the Java TM Bytecode Language

A Type System for Object Initialization In the Java TM Bytecode Language Electronic Notes in Theoretical Computer Science 10 (1998) URL: http://www.elsevier.nl/locate/entcs/volume10.html 7 pages A Type System for Object Initialization In the Java TM Bytecode Language Stephen

More information

Conversions and Casting

Conversions and Casting Conversions and Casting Taken and modified slightly from the book The Java TM Language Specification, Second Edition. Written by Sun Microsystems. Conversion of one reference type to another is divided

More information

Introduction to Programming (Java) 2/12

Introduction to Programming (Java) 2/12 Introduction to Programming (Java) 2/12 Michal Krátký Department of Computer Science Technical University of Ostrava Introduction to Programming (Java) 2008/2009 c 2006 2008 Michal Krátký Introduction

More information

An Introduction to Software Engineering. David Greenstein Monta Vista High School

An Introduction to Software Engineering. David Greenstein Monta Vista High School An Introduction to Software Engineering David Greenstein Monta Vista High School Software Today Software Development Pre-1970 s - Emphasis on efficiency Compact, fast algorithms on machines with limited

More information

public class Test { static int age; public static void main (String args []) { age = age + 1; System.out.println("The age is " + age); }

public class Test { static int age; public static void main (String args []) { age = age + 1; System.out.println(The age is  + age); } Question No :1 What is the correct ordering for the import, class and package declarations when found in a Java class? 1. package, import, class 2. class, import, package 3. import, package, class 4. package,

More information

Improving Scala's Safe Type-Level Abstraction

Improving Scala's Safe Type-Level Abstraction Seminar: Program Analysis and Transformation University of Applied Sciences Rapperswil Improving Scala's Safe Type-Level Abstraction Stefan Oberholzer, soberhol@hsr.ch Dez 2010 Abstract Scala cannot nd

More information

Shigeru Chiba Michiaki Tatsubori. University of Tsukuba. The Java language already has the ability for reection [2, 4]. java.lang.

Shigeru Chiba Michiaki Tatsubori. University of Tsukuba. The Java language already has the ability for reection [2, 4]. java.lang. A Yet Another java.lang.class Shigeru Chiba Michiaki Tatsubori Institute of Information Science and Electronics University of Tsukuba 1-1-1 Tennodai, Tsukuba, Ibaraki 305-8573, Japan. Phone: +81-298-53-5349

More information

Modern Programming Languages. Lecture Java Programming Language. An Introduction

Modern Programming Languages. Lecture Java Programming Language. An Introduction Modern Programming Languages Lecture 27-30 Java Programming Language An Introduction 107 Java was developed at Sun in the early 1990s and is based on C++. It looks very similar to C++ but it is significantly

More information

Chapter. Focus of the Course. Object-Oriented Software Development. program design, implementation, and testing

Chapter. Focus of the Course. Object-Oriented Software Development. program design, implementation, and testing Introduction 1 Chapter 5 TH EDITION Lewis & Loftus java Software Solutions Foundations of Program Design 2007 Pearson Addison-Wesley. All rights reserved Focus of the Course Object-Oriented Software Development

More information

Index COPYRIGHTED MATERIAL

Index COPYRIGHTED MATERIAL Index COPYRIGHTED MATERIAL Note to the Reader: Throughout this index boldfaced page numbers indicate primary discussions of a topic. Italicized page numbers indicate illustrations. A abstract classes

More information

Analysis of Aspect-Oriented Models using Graph Transformation Systems

Analysis of Aspect-Oriented Models using Graph Transformation Systems Analysis of Aspect-Oriented Models using Graph Transformation Systems Katharina Mehner-Heindl 1, Mattia Monga 2, and Gabriele Taentzer 3 1 Dep. of Media and Information Engineering, University of Applied

More information

PROXY WORLD WRAPPED WORLD. link V V V. link FSV FSV DFSV. link. V: Vector FSV: FSVector DFS: DFSVector

PROXY WORLD WRAPPED WORLD. link V V V. link FSV FSV DFSV. link. V: Vector FSV: FSVector DFS: DFSVector Engineering Java Proxy Objects using Reection Karen Renaud & Huw Evans University of Glasgow fkaren,huwg@dcs.gla.ac.uk Abstract Java programmers need to be able to locally specialise the run-time behaviour

More information

Java TM. Multi-Dispatch in the. Virtual Machine: Design and Implementation. Computing Science University of Saskatchewan

Java TM. Multi-Dispatch in the. Virtual Machine: Design and Implementation. Computing Science University of Saskatchewan Multi-Dispatch in the Java TM Virtual Machine: Design and Implementation Computing Science University of Saskatchewan Chris Dutchyn (dutchyn@cs.ualberta.ca) September 22, 08 Multi-Dispatch in the Java

More information

The Compositional C++ Language. Denition. Abstract. This document gives a concise denition of the syntax and semantics

The Compositional C++ Language. Denition. Abstract. This document gives a concise denition of the syntax and semantics The Compositional C++ Language Denition Peter Carlin Mani Chandy Carl Kesselman March 12, 1993 Revision 0.95 3/12/93, Comments welcome. Abstract This document gives a concise denition of the syntax and

More information

STRUCTURING OF PROGRAM

STRUCTURING OF PROGRAM Unit III MULTIPLE CHOICE QUESTIONS 1. Which of the following is the functionality of Data Abstraction? (a) Reduce Complexity (c) Parallelism Unit III 3.1 (b) Binds together code and data (d) None of the

More information

Rigorous development process of a safety-critical system: from ASM models to Java code

Rigorous development process of a safety-critical system: from ASM models to Java code Software Tools for Technology Transfer manuscript No. (will be inserted by the editor) Rigorous development process of a safety-critical system: from ASM models to Java code Paolo Arcaini 1, Angelo Gargantini

More information

The Extensible Java Preprocessor Kit. and a Tiny Data-Parallel Java. Abstract

The Extensible Java Preprocessor Kit. and a Tiny Data-Parallel Java. Abstract The Extensible Java Preprocessor Kit and a Tiny Data-Parallel Java Yuuji ICHISUGI 1, Yves ROUDIER 2 fichisugi,roudierg@etl.go.jp 1 Electrotechnical Laboratory, 2 STA Fellow, Electrotechnical Laboratory

More information

Pace University. Fundamental Concepts of CS121 1

Pace University. Fundamental Concepts of CS121 1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction

More information

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub Lebanese University Faculty of Science Computer Science BS Degree Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub 2 Crash Course in JAVA Classes A Java

More information

Introduction to Java

Introduction to Java Introduction to Java Module 1: Getting started, Java Basics 22/01/2010 Prepared by Chris Panayiotou for EPL 233 1 Lab Objectives o Objective: Learn how to write, compile and execute HelloWorld.java Learn

More information

Introduction to Java. Nihar Ranjan Roy. https://sites.google.com/site/niharranjanroy/

Introduction to Java. Nihar Ranjan Roy. https://sites.google.com/site/niharranjanroy/ Introduction to Java https://sites.google.com/site/niharranjanroy/ 1 The Java Programming Language According to sun Microsystems java is a 1. Simple 2. Object Oriented 3. Distributed 4. Multithreaded 5.

More information

Core JAVA Training Syllabus FEE: RS. 8000/-

Core JAVA Training Syllabus FEE: RS. 8000/- About JAVA Java is a high-level programming language, developed by James Gosling at Sun Microsystems as a core component of the Java platform. Java follows the "write once, run anywhere" concept, as it

More information

Static Type Checking. Static Type Checking. The Type Checker. Type Annotations. Types Describe Possible Values

Static Type Checking. Static Type Checking. The Type Checker. Type Annotations. Types Describe Possible Values The Type Checker Compilation 2007 The type checker has several tasks: determine the types of all expressions check that values and variables are used correctly resolve certain ambiguities by transformations

More information

The Java Memory Model

The Java Memory Model The Java Memory Model What is it and why would I want one? Jörg Domaschka. ART Group, Institute for Distributed Systems Ulm University, Germany December 14, 2009 public class WhatDoIPrint{ static int x

More information

Java Threads and intrinsic locks

Java Threads and intrinsic locks Java Threads and intrinsic locks 1. Java and OOP background fundamentals 1.1. Objects, methods and data One significant advantage of OOP (object oriented programming) is data encapsulation. Each object

More information

R/3 System Object-Oriented Concepts of ABAP

R/3 System Object-Oriented Concepts of ABAP R/3 System Object-Oriented Concepts of ABAP Copyright 1997 SAP AG. All rights reserved. No part of this brochure may be reproduced or transmitted in any form or for any purpose without the express permission

More information

INPUT SYSTEM MODEL ANALYSIS OUTPUT

INPUT SYSTEM MODEL ANALYSIS OUTPUT Detecting Null Pointer Violations in Java Programs Xiaoping Jia, Sushant Sawant Jiangyu Zhou, Sotiris Skevoulis Division of Software Engineering School of Computer Science, Telecommunication, and Information

More information

COP 3330 Final Exam Review

COP 3330 Final Exam Review COP 3330 Final Exam Review I. The Basics (Chapters 2, 5, 6) a. comments b. identifiers, reserved words c. white space d. compilers vs. interpreters e. syntax, semantics f. errors i. syntax ii. run-time

More information

Chapter 4.!Data Abstraction: The Walls! 2011 Pearson Addison-Wesley. All rights reserved 4-1

Chapter 4.!Data Abstraction: The Walls! 2011 Pearson Addison-Wesley. All rights reserved 4-1 Chapter 4!Data Abstraction: The Walls! 2011 Pearson Addison-Wesley. All rights reserved 4-1 2015-09-29 11:44:25 1/45 Chapter-04.pdf (#4) bubblesort(int[] a) { int last = a.length - 1; while (last > 0)

More information

The Java Language Implementation

The Java Language Implementation CS 242 2012 The Java Language Implementation Reading Chapter 13, sections 13.4 and 13.5 Optimizing Dynamically-Typed Object-Oriented Languages With Polymorphic Inline Caches, pages 1 5. Outline Java virtual

More information

COS 320. Compiling Techniques

COS 320. Compiling Techniques Topic 5: Types COS 320 Compiling Techniques Princeton University Spring 2016 Lennart Beringer 1 Types: potential benefits (I) 2 For programmers: help to eliminate common programming mistakes, particularly

More information

Java Overview An introduction to the Java Programming Language

Java Overview An introduction to the Java Programming Language Java Overview An introduction to the Java Programming Language Produced by: Eamonn de Leastar (edeleastar@wit.ie) Dr. Siobhan Drohan (sdrohan@wit.ie) Department of Computing and Mathematics http://www.wit.ie/

More information

Inheritance Metrics: What do they Measure?

Inheritance Metrics: What do they Measure? Inheritance Metrics: What do they Measure? G. Sri Krishna and Rushikesh K. Joshi Department of Computer Science and Engineering Indian Institute of Technology Bombay Mumbai, 400 076, India Email:{srikrishna,rkj}@cse.iitb.ac.in

More information

Certified Core Java Developer VS-1036

Certified Core Java Developer VS-1036 VS-1036 1. LANGUAGE FUNDAMENTALS The Java language's programming paradigm is implementation and improvement of Object Oriented Programming (OOP) concepts. The Java language has its own rules, syntax, structure

More information

CSE 421 Course Overview and Introduction to Java

CSE 421 Course Overview and Introduction to Java CSE 421 Course Overview and Introduction to Java Computer Science and Engineering College of Engineering The Ohio State University Lecture 1 Learning Objectives Knowledgeable in how sound software engineering

More information

The Java Memory Model

The Java Memory Model Jeremy Manson 1, William Pugh 1, and Sarita Adve 2 1 University of Maryland 2 University of Illinois at Urbana-Champaign Presented by John Fisher-Ogden November 22, 2005 Outline Introduction Sequential

More information

Class, Variable, Constructor, Object, Method Questions

Class, Variable, Constructor, Object, Method Questions Class, Variable, Constructor, Object, Method Questions http://www.wideskills.com/java-interview-questions/java-classes-andobjects-interview-questions https://www.careerride.com/java-objects-classes-methods.aspx

More information

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc. Chapter 1 GETTING STARTED SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: Java platform. Applets and applications. Java programming language: facilities and foundation. Memory management

More information

Compilation 2012 Static Type Checking

Compilation 2012 Static Type Checking Compilation 2012 Jan Midtgaard Michael I. Schwartzbach Aarhus University The Type Checker The type checker has several tasks: determine the types of all expressions check that values and variables are

More information

An Approach to the Generation of High-Assurance Java Card Applets

An Approach to the Generation of High-Assurance Java Card Applets An Approach to the Generation of High-Assurance Java Card Applets Alessandro Coglio Kestrel Institute 3260 Hillview Avenue, Palo Alto, CA 94304, USA Ph. +1-650-493-6871 Fax +1-650-424-1807 http://www.kestrel.edu/

More information

CHAPTER 1 Introduction to Computers and Java

CHAPTER 1 Introduction to Computers and Java CHAPTER 1 Introduction to Computers and Java Copyright 2016 Pearson Education, Inc., Hoboken NJ Chapter Topics Chapter 1 discusses the following main topics: Why Program? Computer Systems: Hardware and

More information

The Stepping Stones. to Object-Oriented Design and Programming. Karl J. Lieberherr. Northeastern University, College of Computer Science

The Stepping Stones. to Object-Oriented Design and Programming. Karl J. Lieberherr. Northeastern University, College of Computer Science The Stepping Stones to Object-Oriented Design and Programming Karl J. Lieberherr Northeastern University, College of Computer Science Cullinane Hall, 360 Huntington Ave., Boston MA 02115 lieber@corwin.ccs.northeastern.edu

More information

Java TM Introduction. Renaud Florquin Isabelle Leclercq. FloConsult SPRL.

Java TM Introduction. Renaud Florquin Isabelle Leclercq. FloConsult SPRL. Java TM Introduction Renaud Florquin Isabelle Leclercq FloConsult SPRL http://www.floconsult.be mailto:info@floconsult.be Java Technical Virtues Write once, run anywhere Get started quickly Write less

More information

Stronger Typings for Separate Compilation of Java-like Languages (Extended Abstract)

Stronger Typings for Separate Compilation of Java-like Languages (Extended Abstract) Stronger Typings for Separate Compilation of Java-like Languages (Extended Abstract) Davide Ancona and Giovanni Lagorio DISI - Università di Genova Via Dodecaneso, 35, 16146 Genova (Italy) email: {davide,lagorio}@disi.unige.it

More information

Points To Remember for SCJP

Points To Remember for SCJP Points To Remember for SCJP www.techfaq360.com The datatype in a switch statement must be convertible to int, i.e., only byte, short, char and int can be used in a switch statement, and the range of the

More information

INDEX. A SIMPLE JAVA PROGRAM Class Declaration The Main Line. The Line Contains Three Keywords The Output Line

INDEX. A SIMPLE JAVA PROGRAM Class Declaration The Main Line. The Line Contains Three Keywords The Output Line A SIMPLE JAVA PROGRAM Class Declaration The Main Line INDEX The Line Contains Three Keywords The Output Line COMMENTS Single Line Comment Multiline Comment Documentation Comment TYPE CASTING Implicit Type

More information