You do something like below in C#,
File 1: MoreClasses.cs
using System;
using System.Linq;
using System.Collections.Generic
namespace PetFiler2 {
class Fish {
public void Swim() {
// statements
}
}
partial class Cat {
public void Purr() {
// statements
}
}
}
File 2: SomeClasses.cs
namespace PetFiler2 {
class Dog {
public void Bark() {
// statements go here
}
}
partial class Cat {
public void Meow() {
// more statements
}
}
}
In java: import is the counterpart of using, and package is the other for namespace.
In my knowledge, I can not find the implementation for partial class before JDK 7 (I don't have too much idea about JDK7)
File 1: MoreClasses.cs
using System;
using System.Linq;
using System.Collections.Generic
namespace PetFiler2 {
class Fish {
public void Swim() {
// statements
}
}
partial class Cat {
public void Purr() {
// statements
}
}
}
File 2: SomeClasses.cs
namespace PetFiler2 {
class Dog {
public void Bark() {
// statements go here
}
}
partial class Cat {
public void Meow() {
// more statements
}
}
}
In java: import is the counterpart of using, and package is the other for namespace.
In my knowledge, I can not find the implementation for partial class before JDK 7 (I don't have too much idea about JDK7)
Comments
Post a Comment