.Net vs. Java And why.Net is better. Hello World in Java.

Slides:



Advertisements
Similar presentations
For(int i = 1; i
Advertisements

H OW O BJECTS B EHAVE. O VERVIEW Methods use object state Arguments and return types in methods Java passes by value Getters and Setters Encapsulation.
 In inheritance the child (subclass) chooses its parent (superclass)  Remember - only public or “protected” methods and variables are inherited  Should.
Road Map Introduction to object oriented programming. Classes
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++
Evan Korth New York University Computer Science I Classes and Objects Professor: Evan Korth New York University.
C#/.NET Jacob Lewallen. C# vs.NET.NET is a platform. Many languages compile to.NET: –VB.NET –Python.NET –Managed C++ –C#
Terms and Rules Professor Evan Korth New York University (All rights reserved)
1 Collections Working with More than One Number or Data Type or Object.
Lecture 9 Concepts of Programming Languages
Chapter 101 Dynamic Data Structures and Generics Chapter 10.
Introduction Who we are How we’re going to help: Java and course- related material Subsribe to mailing list: COMP 346:
More C++ Bryce Boe 2013/07/18 CS24, Summer 2013 C.
Comparison of OO Programming Languages © Jason Voegele, 2003.
Eclipse – making OOP Easy
Meir Botner David Ben-David. Project Goal Build a messenger that allows a customer to communicate with a service provider for a fee.
MESDA Conference 2002 MESDA Annual Conference 2002 Software Development Track Java vs. C#
COP INTERMEDIATE JAVA Designing Classes. Class Template or blueprint for creating objects. Their definition includes the list of properties (fields)
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and Server Side Programming Very rich GUI libraries Portability (machine independence) A.
How to be a C# ninja in 10 easy steps Benjamin Day.
Java Objects and Classes. Overview n Creating objects that belong to the classes in the standard Java library n Creating your own classes.
Lecture 71 CS110 Lecture 7 February 17, 2004 Announcements –hw3 due Thursday Agenda –questions –hw3 tips –getters and setters – information hiding –delegation.
10-Nov-15 Java Object Oriented Programming What is it?
CS2210: SW Development Methods Topics: Comparable and Comparator interfaces in JCF Function objects Textbook readings: More from MSD, Chapter 9 Pages
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and web applications Very rich GUI libraries Portability (machine independence) A real Object.
Practical Session 4 Java Collections. Outline Working with a Collection The Collection interface The Collection hierarchy Case Study: Undoable Stack The.
COP INTERMEDIATE JAVA Designing Classes. Class Template or blueprint for creating objects. Their definition includes the list of properties (fields)
C++ The reason why it is still in use. Table of Contents Disadvantages Disadvantages Advantages Advantages Compare with object-oriented programming language.
CMSC 330: Organization of Programming Languages Functional Programming with OCaml.
Chapter 6 Classes & Objects. Learning Java through Alice 2 © Daly and Wrigley Class A class defines a particular kind of object. Each class is a blueprint.
Computer Science 209 Software Development Inheritance and Composition.
From C++ to C# Part 5. Enums Similar to C++ Similar to C++ Read up section 1.10 of Spec. Read up section 1.10 of Spec.
Data Design and Implementation. Definitions Atomic or primitive type A data type whose elements are single, non-decomposable data items Composite type.
5.1 Basics of defining and using classes A review of class and object definitions A class is a template or blueprint for an object A class defines.
C# Fundamentals An Introduction. Before we begin How to get started writing C# – Quick tour of the dev. Environment – The current C# version is 5.0 –
Comp1004: Environments The Java Library. Coming up Recap – Encapsulation – Constructors – Loops – Arrays – ArrayList – Iterators The Java Library – Implementation.
Heath Carroll Bill Hanczaryk Rich Porter.  A Theory of Type Polymorphism in Programming ◦ Robin Milner (1977)  Milner credited with introducing the.
Hello Educational presentation.
יסודות מדעי המחשב – תרגול 6
C# for C++ Programmers 1.
Object-Oriented Design
Classes and OOP.
Lecture 39: Case Study: C# and .NET
Road Map Introduction to object oriented programming. Classes
Array Array is a variable which holds multiple values (elements) of similar data types. All the values are having their own index with an array. Index.
Anatomy of a Class & Method
Data Structures and Database Applications Abstract Data Types
Chapter 7 Classes & Objects.
Lecture 9 Concepts of Programming Languages
.NET and .NET Core 9. Towards Higher Order Pan Wuming 2017.
Control Structures (Structured Programming) for controlling the procedural aspects of programming CS1110 – Kaminski.
Chapter 9 Classes & Objects.
More on Thread Safety CSE451 Andrew Whitaker.
How Objects Behave Chapter 4.
Chapter 7 Classes & Objects.
Chapter 7 Classes & Objects.
1.4 ทบทวน JAVA OO Programming Concepts Declaring and Creating Objects
Control Structures (Structured Programming) for controlling the procedural aspects of programming CS1110 – Kaminski.
Paul Stubbs MCSD, MCSE 4.0, MCP+I, MCT, MCAD .Net
Event loops.
Classes and Objects CGS3416 Spring 2019.
Object-Oriented Design AND CLASS PROPERTIES
Dynamic Array: Implementation of Stack
C# Language & .NET Platform 3rd Lecture
ITE “A” GROUP 2 ENCAPSULATION.
C# Language & .NET Platform 8th Lecture
Object-Oriented Design AND CLASS PROPERTIES
Chengyu Sun California State University, Los Angeles
Lecture 9 Concepts of Programming Languages
Object-Oriented Design AND CLASS PROPERTIES
Presentation transcript:

.Net vs. Java And why.Net is better

Hello World in Java

Hello World in C#

Class Libraries Both platforms have rich class libraries If you think it’s common, it’s probably in been done for you..Net has fewer collections ◦.Net List == Java ArrayList == Vector ◦Dictionaries are awesome, abuse them whenever you can

GUI Development in Java

GUI Development in C#

For Each Loops Java: Thing[] foo; for(Thing bar : foo){… C# Thing[] foo; foreach(Thing bar in foo){…

Properties Given int myThing; Java has getters and setters (getThing(), setThing()) ◦Used like methods, because they are.Net has properties ◦Used like variables, but still encapsulated

Events Java has anonymous classes galore.Net has delegates (type safe function pointers)

Other differences Attributes are cool.Net has more flexibility to do dirty things (overloading operators, hiding base methods, etc.)