Peter Juszczyk CS 492/493 - ISGS. // Is this C# or Java? class TestApp { static void Main() { int counter = 0; counter++; } } The answer is C# - In C#

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 12 Introduction to ASP.NET.
Advertisements

IT 325 OPERATING SYSTEM C programming language. Why use C instead of Java Intermediate-level language:  Low-level features like bit operations  High-level.
Lecture 10: Part 1: OO Issues CS 540 George Mason University.
Portability and Safety Mahdi Milani Fard Dec, 2006 Java.
Lab#1 (14/3/1431h) Introduction To java programming cs425
The Type System1. 2.NET Type System The type system is the part of the CLR that defines all the types that programmers can use, and allows developers.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
C#.NET C# language. C# A modern, general-purpose object-oriented language Part of the.NET family of languages ECMA standard Based on C and C++
Trey Mack James Moore Osa Osar-Emokpae
C#: Project Cool Arthur Ketchel II Keith Francisco Chris McInnis.
Data Abstraction and Object- Oriented Programming CS351 – Programming Paradigms.
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science Computer Systems Principles C/C++ Emery Berger and Mark Corner University of Massachusetts.
University of Virginia CSharp (© John Knight 2005) 1 What’s New In C#
Abstract Data Types and Encapsulation Concepts
Introduction to Java Programming Language Junji Zhi University of Toronto 1.
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.
Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.
Java vs. C# By Abrar Siddiqui.
Differences between C# and C++ Dr. Catherine Stringfellow Dr. Stewart Carpenter.
OOP Languages: Java vs C++
+ Java vs. Javascript Jessi Style. + Java Compiled Can stand on its own Written once, run anywhere Two-stage debugging Java is an Object Oriented Programming.
Java Security. Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security Manager.
Programming Languages and Paradigms Object-Oriented Programming.
Distributed Systems (236351) Tutorial 1 - Getting Started with Visual Studio C#.NET.
Object Oriented Programming: Java Edition By: Samuel Robinson.
Algorithm Programming Bar-Ilan University תשס"ח by Moshe Fresko.
1 Comp 104: Operating Systems Concepts Java Development and Run-Time Store Organisation.
University of Houston-Clear Lake Proprietary© 1997 Evolution of Programming Languages Basic cycle of improvement –Experience software difficulties –Theory.
Introduction to C# C# is - elegant, type-safe, object oriented language enabling to build applications that run on the.NET framework - types of applications.
C#C# Introduction CS3260 Dennis A. Fairclough Version 1.0 Introduction CS3260 Dennis A. Fairclough Version 1.0.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
Netprog: Java Intro1 Crash Course in Java. Netprog: Java Intro2 Why Java? Network Programming in Java is very different than in C/C++ –much more language.
Introduction to Object Oriented Programming CMSC 331.
Applied Computing Technology Laboratory QuickStart C# Learning to Program in C# Amy Roberge & John Linehan November 7, 2005.
C# Versus Java Author: Eaddy, Marc Source: Software Tools for the Professional Programmer. Dr. Dobb's Journal. Feb2001, Vol. 26 Issue 2, p74 Hong Lu CS699A.
Page: 1 การโปรแกรมเชิงวัตถุด้วยภาษา JAVA บุรินทร์ รุจจนพันธุ์.. ปรับปรุง 15 มิถุนายน 2552 Keyword & Data Type มหาวิทยาลัยเนชั่น.
C# EMILEE KING. HISTORY OF C# In the late 1990’s Microsoft recognized the need to be able to develop applications that can run on multiple operating system.
Copyright © Curt Hill Structured Data What this course is about.
C# C1 CSC 298 Elements of C# code (part 1). C# C2 Style for identifiers  Identifier: class, method, property (defined shortly) or variable names  class,
CS 261 – Data Structures Introduction to C Programming.
Java Basics Opening Discussion zWhat did we talk about last class? zWhat are the basic constructs in the programming languages you are familiar.
Objects and Variables Local variables – Confined to single context: allocated on stack – Primitive types such as int or object references – Must be initialized.
Object Oriented Software Development 4. C# data types, objects and references.
Duke CPS From C++ to Java l Java history: Oak, toaster-ovens, internet language, panacea l What it is ä O-O language, not a hybrid (cf. C++)
Classes, Arrays & Pointers. Compiler & Linker expectations file1.cppfile2.cppfilen.cpp …. file1.ofile2.ofilen.o …. Linker application (executable) Compiler.
Introduction to C# By: Abir Ghattas Michel Barakat.
Object Oriented Programming Session # 03.  Abstraction: Process of forming of general and relevant information from a complex scenarios.  Encapsulation:
Java & C++ Comparisons How important are classes and objects?? What mechanisms exist for input and output?? Are references and pointers the same thing??
Introduction to C# Anders Hejlsberg Distinguished Engineer Developer Division Microsoft Corporation.
1 C# - Inheritance and Polymorphism. 2 1.Inheritance 2.Implementing Inheritance in C# 3.Constructor calls in Inheritance 4.Protected Access Modifier 5.The.
Reference Types CSE301 University of Sunderland Harry R Erwin, PhD.
Object Oriented Programming Lecture 2: BallWorld.
Memory Management in Java Mr. Gerb Computer Science 4.
Java and C# - Some Commonalities Compile into machine-independent, language- independent code which runs in a managed execution environment Garbage Collection.
Value Types. 2 Objectives Discuss concept of value types –efficiency –memory management –value semantics –boxing –unboxing –simple types Introduce struct.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
INTRODUCTION BEGINNING C#. C# AND THE.NET RUNTIME AND LIBRARIES The C# compiler compiles and convert C# programs. NET Common Language Runtime (CLR) executes.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Object Oriented Programming in
Intro to Java L. Grewe.
Chapter 6 – Data Types CSCE 343.
CS230 Tutorial Week 3.
CS360 Windows Programming
.NET and .NET Core 5.2 Type Operations Pan Wuming 2016.
Starting JavaProgramming
Pointers C#, pointers can only be declared to hold the memory addresses of value types int i = 5; int *p; p = &i; *p = 10; // changes the value of i to.
From C++ to Java Java history: Oak, toaster-ovens, internet language, panacea What it is O-O language, not a hybrid (cf. C++) compiled to byte-code, executed.
(Computer fundamental Lab)
Presentation transcript:

Peter Juszczyk CS 492/493 - ISGS

// Is this C# or Java? class TestApp { static void Main() { int counter = 0; counter++; } } The answer is C# - In C# Main() always starts with an uppercase. In Java it is lowercase.

 It should be "simple, object oriented, and familiar".  It should be "robust and secure".  It should execute with "high performance".  It should be "architecture neutral and portable".

 Both C# and Java are designed from the ground up as VMT-based object oriented languages  Syntax similar to C++/C  Both use garbage collection as a means of reclaiming memory resources  Both include thread synchronization mechanisms as part of their language syntax

 C# allows restricted use of pointers  Code blocks or methods marked with the unsafe keyword  Compiler requires the /unsafe switch to allow compilation of a program that uses such code  Java does not allow pointers or pointer- arithmetic to be used  The arguments to a method are passed by value

 Both languages support the idea of primitive types  Both treat Strings as immutable objects  C# has more primitive types than Java - unsigned as well as signed integer types supported  Both allow automatic boxing and unboxing to translate primitive data to and from their object form

 C# allows the programmer to create user- defined value types using the struct keyword  Such value types are allocated on the stack rather than on the heap  Can be seen as lightweight classes  Limitations: no inheritance  Java has no such corresponding concept

 C# enums are derived from a primitive 8, 16, 32, or 64 bit integer type  Java enums are objects  They are typesafe and can be extended by adding methods or fields

 In C# an array corresponds to an object of the Array class  Java each array is a direct subclass of the Object class  Both support arrays of arrays (jagged arrays).  C# also has true multidimensional arrays  Increase performance because of increased locality

 Enables one to define a single class, struct or interface across multiple source files  Useful when dealing with automatically generated code  Automatically generated parts of a class can live in one source file while the user generated parts of the class can live in another  Java has no such corresponding concept

 Verbatim Strings  Overflow Detection  Explicit Interface Implementation  Friend Assemblies  The Namespace Qualifier  Iterators (Continuations)  Static Classes  Nullable Types  Anonymous Methods

 Extensions  strictfp  Dynamic Class Loading  Interfaces That Contain Fields  Anonymous Inner Classes  Static Imports

 The results are in MFlops (mega floating- point operations per second), so higher is better.

For a far more in-depth comparison check out: ml#structs