Tag Archives: .net

Overriding and overloading in Java and .NET – differences, changes and gotchas

Foraying even more in the fundamentals of Java (coming from a .NET background) I’ve come across some interesting things, along with changes in Java SE 5. But first let’s clear up a bit these two notions (overloading and overriding).

Overriding

Is a language feature that allows a subclass/inheriting class to have a method identical (we’ll later see a slight exception to this) to the one in the base class/superclass in every way except the implementation. That is, to have the same return type, the same name, same paramater types, same parameter order, just the code (and the parameter names) can differ.

This is by no means a definitive definition, Wikipedia, .NET CLS’s and JLS may very well differ slightly.

A typical C# overriding example (yes, I also dislike animal examples but they are so eaaaasyyyy to come up with) :

public class Dog 
{
    public virtual void MakeSound()
    {
         Console.WriteLine("Bark.");
    }
}

public class Hound : Dog
{
    public override void MakeSound()
    {
         Console.WriteLine("Wooofff!!!");
    }
}

Java developers unaware of the intricacies of C# will wonder what is that “virtual” thing. In C# all methods are “final” (sealed) by default unlike Java where methods are “virtual” (non-final / non-sealed) by default. This is a profound difference which we’ll discuss later. The “:” stands for “extends”. We’ll discuss the “override” keyword soon, also.

The equivalent piece of code in Java would look like :

public class Dog {
    public void makeSound() {
        System.out.println("Bark.");
    }
}

public class Hound extends Dog {
    public void makeSound() {
        System.out.println("Woofff!!!");
    }
}

Read more »

Beginning Java for .NET Developers

I’ve always wanted to learn another language and platform and being a long-time .NET developer Java seemed the closest to my knowledge and one which would seem easy to learn based on what I already knew.

I’ve put off this for various reason along the last 3-4 years, most of which laziness was chief.

Recently some colleagues moved from our project to another project that involves Java modules and since .NET is not a first-class citizen in my employer’s eyes I thought maybe it could serve me as a kind of an ‘insurance’ – to learn Java.

I’ve obtained (..) some ebooks (Effective Java and Thinking in Java), downloaded JDK, a few IDEs (IntelliJ IDEA and NetBeans, no Eclipse for me, thanks) and started doing HelloWorld’s and stuff like that. I noticed JavaFX (which is quite similar to WPF on which I currently work)

I’ve came across two nice comparisons of Java and .NET, written in a constructive manner (i.e. not “mine is better, na nanana”) :

Using these two articles I compiled (yes, that’s the original meaning of the word :P) a PowerPoint slideshow.

Then I thought there might be other (.NET developer) colleagues that might be interested in my research and gave an internal presentation based on the slideshow and expanding each item by talk.

I thought I should share it with everyone so here it is (download here) :

I’ve written about Java / C# differences before, and I might continue that series in the near future, with practical examples and counter-examples.

Network Security Measures

An MSSP should provide a complete outsourced security solution for an organization’s leading data center. We have expertise in:

Firewall, intrusion detection, firewall protection, network security and security incidents management.

You need to be confident that the network security program is up to the task of protecting the applications and data as they traverse the public internet. The IMSI Security Product List (ISPL) is part of the MSSP package, also there are services for MSSP which you can find in this webpage online. It includes:

Advance Threat Detection (ATD) – This tool compares how the data traffic is encrypted with Internet Key Exchange (IKE) and Active Directory/Active Directory Federation Services (ADFS) encryption methods.

– This tool compares how the data traffic is encrypted with Internet Key Exchange (IKE) and Active Directory/Active Directory Federation Services (ADFS) encryption methods. Antispam Analysis – Uses your analysis for more accurate results in compliance and compliance intelligence.

– Uses your analysis for more accurate results in compliance and compliance intelligence. Antivirus – For preventing virus infections that may lead to mis-configuration, network compromise or the loss of user data.

– For preventing virus infections that may lead to mis-configuration, network compromise or the loss of user data. Cloud Diagnostics – Provides insights on applications and data hosted on Microsoft Azure for further analysis and security recommendations.

– Provides insights on applications and data hosted on Microsoft Azure for further analysis and security recommendations. Data Loss Prevention – Tools to help protect personal data that is located on the network from unauthorized access and data loss.

– Tools to help protect personal data that is located on the network from unauthorized access and data loss. Data Loss Prevention and Advanced Threat Protection – Improved technology to protect against data loss and prevent/mitigate software, hardware and user attacks.

– Improved technology to protect against data loss and prevent/mitigate software, hardware and user attacks. Extensible Storage Engine – Extends the capability to the network in ways that are not available with a standard SAN.

– Extends the capability to the network in ways that are not available with a standard SAN. Flexible Configuration – Provides flexibility to provide configurable information exchange. This includes: Secure connection to a private or secured network using HTTPS, HTTPS Secure (SSL), HTTPS Secure (WPA/WPA2) (WEP) or port 443, Secure (DHCP) or Basic services for private and secure web-browsing and content publishing services. Secure (S/MIME) Security Using certificates that secure connections with authentication and encryption to your enterprise users, apps, applications and services. Transport Layer Security (TLS) – Protects all Internet traffic, while providing extra protection for sensitive data such as key exchanges, identity, credit card and signature verification.

– Protects all Internet traffic, while providing extra protection for sensitive data such as key exchanges, identity, credit card and signature verification. Remote Desktop Services (RDS) Authentication – Provides remote connection to a Microsoft hosted Windows Server instance for usage, file and printer sharing, system and system center administration. Microsoft Active Directory – Provides access to network resources, and configuration and administration of remote Windows desktop and desktop connectivity applications.