-
Notifications
You must be signed in to change notification settings - Fork 4
ImportTransformer
Mehdi Mohammadi edited this page Dec 29, 2013
·
1 revision
In Java, to import whole classes of a package you can use import <package>.*
syntax:
import java.util.*;
In C# it should be
import java.util;
Also, to import single class of a package in Java, name of that class is brought after package name:
import java.util.List;
but in C#, we should use aliases.
using List = java.util.List;
[Java]
package Test;
import junit.framework.*;
import java.lang.StringBuffer;
public class Test
{
}
[C#]
namespace Test
{
using junit.framework;
using StringBuffer = java.lang.StringBuffer;
public class Test
{
}
}