Java和C#基本类库的区别
java.lang
java |
.net |
Boolean |
System.Boolean |
System. Byte |
|
System.Char |
|
Class |
System.Type |
Double |
System.Double |
Float |
System.Single |
Integer |
System.Int32 |
Long |
System.Int64 |
Math |
System.Math |
Object |
System.Object |
Process |
System. Diagnostics .Process |
Runtime |
System. Diagnostics .Process |
Short |
System.Int16 |
StrictMath |
System.Math |
Strng |
System.Strng |
StringBuffer |
System. Text .StringBuffer |
Thread |
System. Threading .Thread |
ThreadLocal |
System.LocalDataStoreSlot |
java.lang.reflect
java |
.net |
AccessibleObject |
System.reflection.MemberInfo |
Array |
System. Array |
Constructor |
System.reflection.ConstructorInfo |
Field |
System.reflection.FieldInfo |
Method |
System.reflection.MethodInfo |
Modifier |
System.reflection.MethodAttributes |
ReflectdPermission |
System. Security . Permissions.ReflectdPermission |
java.lang.ref
java |
.net |
WeakReference |
System.WeakReference |
java.util包
java.util
java |
.net |
AbstractColletion |
System.Collections.CollectionsBase |
ArrayList |
System.Collections.ArrayList |
Arrays |
System.Arrays |
BitSet |
System.Collections.BitArray |
Calendar |
System.Globalization.Calendar |
Currency |
System.Globalization.RegionInfo |
Date |
System.Datetime |
Dictionary |
System.Collections.DictionaryBase |
EventObject |
System.EventArgs |
GregorianCalendar |
System.Globalization.GregorianCalendar |
HashMap |
System.Collections.HashMap |
Hashtable |
System.Collections.HashMap |
ListResourseBundle |
System.Resources.ResourceManger |
Locale |
System.Globalization.CultureInfo |
Random |
System.Random |
ResourseBundle |
System.Resources.ResourceSet |
SimpleTimeZone |
System.Datetime |
Stack |
System.Collections.Stack |
Timer |
System.Threading.Timer |
TimerTask |
System.Threading.TimerCallback |
TimeZone |
System.DataTime |
TreeSet |
System.Collections.SortedList |
Vector |
System.Collections.ArrayList |
java.util.regex
java |
.net |
Matcher |
System.Text.RegularExpressions.Match System.Text.RegularExpressions.MatchCollection System.Text.RegularExpressions.Group System.Text.RegularExpressions.GroupCollection |
Pattern |
System.Text.RegularExpressions.Regex System.Text.RegularExpressions.RegexCompilationInfo System.Text.RegularExpressions.RegexOption |
PatternSyntaxExcetpion |
System. ArgumentExcetion |
java.util.logging/java.util.jar/java.util.zip/java.util.pref 包中的类在.NET中没有与之对应的部分
java.io包
java |
.net |
BufferedInputStream |
System.IO.BufferedStream |
BufferedOutputStream |
System.IO.BufferedStream |
BufferedReader |
System.IO.StreamReader |
BufferedWriter |
System.IO.StreamWriter |
ByteArrayInputStream |
System.IO.MemoryStream |
ByteArrayOutputStream |
System.IO.MemoryStream |
CharArrayReader |
System.IO.StreamReader |
CharArrayWriter |
System.IO.StreamWriter |
DataInputStream |
System.IO.BinaryReader |
DataOutputStream |
System.IO.BinaryWriter |
File |
System.IO.File |
FileInputStream |
System.IO.FileStream |
FileOutputStream |
System.IO.FileStream |
FileReader |
System.IO.StreamReader |
FileWriter |
System.IO.StreamWriter |
InputStream |
System.IO.Stream |
OutputStream |
System.IO.Stream |
PrintStream |
System.IO.StreamWriter |
PrintWriter |
System.IO.StreamWriter |
PushbackInputStream |
System.IO.StreamReader |
PushbackOutputStream |
System.IO.StreamReader |
RamdomAccessFile |
System.IO.FileStream |
StringBufferInputstream |
System.IO.StringReader |
StringReader |
System.IO.StringReader |
StringWriter |
System.IO.StringWriter |
java.sql包
.net 中没有与javax.sql包直接对应的部分,System.Data命名空间提供了连接池和事务处理类。
java的Rowset类在某些方面与.net的DataDet类相似
java |
.net |
Blob |
System.Data.Sqlclient.SqlDataReader System.Data.OleDb.OleDbDataReader |
CallableStatement |
System.Data.Sqlclient.Sqlcommand System.Data.OleDb.OleDbcommand |
Clob |
System.Data.Sqlclient.SqlDataReader System.Data.OleDb.OleDbDataReader |
Connection |
System.Data.Sqlclient.Sql System.Data.OleDb.OleDb |
Date |
System.Data. SqlTypes . SqlDateTime |
ParameterMetaData |
System.Data.Sqlclient.SqlParameter System.Data.OleDb.OleDbParameter |
PreparedStatement |
System.Data.Sqlclient.SqlCommand System.Data.OleDb.OleDbCommand |
ResultSet |
System.Data.Sqlclient.SqlDataReader System.Data.OleDb.OleDbDataReader |
ResultSetMetaData |
System.Data.Sqlclient.SqlDataReader System.Data.OleDb.OleDbDataReader |
Savepoint |
System.Data.Sqlclient. SqlTransaction |
SQLPermission |
System.Data.Sqlclient.SqlclientPermission System.Data.OleDb.OleDbPermission |
Statement |
System.Data.Sqlclient.SqlParameter System.Data.OleDb.OleDbCommand |
Time |
System.Data. SqlTypes . SqlDateTime |
Types |
System.Data.DbTypes |
java.text包
java |
.net |
DataFormat |
System.DateTime |
DateFomatSymbols |
System.Globalization.DateaTimeFormatInfo |
NumberFormat |
System.Globalization.NumberFormatInfo |
SimpleDateFormat |
System.Globalization.DateTimeFormatInfo |
StringCharacterIterator |
System.IEnumerator (System,String) |
org.w3c.dom包
java |
.net |
Attr |
System.Xml.XmlAttribute |
CdatSection |
System.Xml.XmlCDataSetion |
CharacterData |
System.Xml.XmlCharacterData |
Comment |
System.Xml.XmlComment |
Document |
System.Xml.XmlDocument |
DocumentFragment |
System.Xml.XmlDocumentFragment |
DocumentType |
System.Xml.XmlDocumentType |
DOMImplementation |
System.Xml.XmlDOMImplementation |
Element |
System.Xml.XmlElement |
Entity |
System.Xml.XmlEntity |
EntityReference |
System.Xml.XmlEntityReference |
NameNodeMap |
System.Xml.XmlNameNodeMap |
Node |
System.Xml.XmlNode |
NodeList |
System.Xml.XmlNodeList |
Notation |
System.Xml.XmlNotation |
ProcessingInstruction |
System.Xml.XmlProcessingInstruction |
DOMException |
System.ArgumentException |
javax.swing包
.net没有提供与下列包直接等价的类:
javax.swing.plaf/javax.swing.border/javax.swing.table/javax.swing.text( 可用System.Windows.Form.RichTextBox 代替 ) 和 javax.swing.filechooser ( 可用System.Windows.Form.OpenFileDialog 和 System.Windows.Form.SaveFileDialog 代替 )
javax.swing
java |
.net |
AbstractButton |
System.Windows.Forms. ButtonBase |
AbstractListModel |
System.Windows.Forms.ListControl |
AbstractSpinnerModel |
System.Windows.Forms.UpDownBase |
ImageIcon |
System.Windows.Forms.Image |
Jbutton |
System.Windows.Forms.Button |
JCheckBox |
System.Windows.Forms.CheckBox |
JColorChooser |
System.Windows.Forms.ColorDialog |
JComboBox |
System.Windows.Forms.ComboBox |
JComponent |
System.Windows.Forms.UserControl |
JDialog |
System.Windows.Forms.CommonDialog |
JEditorpane |
System.Windows.Forms.TextBoxBase |
JFileChooser |
System.Windows.Forms.OpenFileDialog |
JFormattedTextField |
System.Windows.Forms.RichTextBox |
JFrame |
System.Windows.Forms.Form |
JLabel |
System.Windows.Forms.Label |
JList |
System.Windows.Forms.ListBox |
JMenuBar |
System.Windows.Forms.MainMenu |
JMenuItem |
System.Windows.Forms.MenuItem |
JPanel |
System.Windows.Forms.Panel |
JPasswordField |
System.Windows.Forms.TextBox |
JPopupMenu |
System.Windows.Forms.ContextMenu |
JProgressBar |
System.Windows.Forms.ProgressBar StatusBar |
JRadioButton |
System.Windows.Forms.RadioButton |
JScrollBar |
System.Windows.Forms.HScrollBar System.Windows.Forms.VScrollBar |
JScrollPane |
System.Windows.Forms.Panel |
JSlider |
System.Windows.Forms.TrackBar |
JSpinner |
System.Windows.Forms.DomainUpDown |
JSpitPane |
System.Windows.Forms.Splitter |
JTable |
System.Windows.Forms.ListView |
JTextArea |
System.Windows.Forms.TextBox |
JTextField |
System.Windows.Forms.TextBox |
JTextPane |
System.Windows.Forms.RichTextBox |
JTogleButton |
System.Windows.Forms. ButtonBase |
JToolBar |
System.Windows.Forms.ToolBar |
JToolTip |
System.Windows.Forms.ToolTip |
JTree |
System.Windows.Forms.ListView |
Popup |
System.Windows.Forms.ContextMenu |
Timer |
System.Windows.Forms.Timer |
javax.swing.event
java |
.net |
CaratEvent |
System.EventArgs |
ListDataEvent |
System.EventArgs |
ListSelectionEvent |
System.EventArgs |
MenuEvent |
System.EventArgs |
PopupMenuEvent |
System.EventArgs |
java.awt包
java.awt
java |
.net |
AWTEvernt |
System.EventArgs |
AWTKeyStroke |
System.Windows.Forms.KeyPressEventArgs |
AWTPermission |
System.Security.Permissions.UIPermission |
BasicStroke |
System.Drawing.Pen |
Button |
System.Windows.Forms.Button |
Canvas |
System.Windows.Forms. Control |
CheckBox |
System.Windows.Forms.RadioButton |
Choice |
System.Windows.Forms.ComboBox |
Color |
System.Drawing.Color |
Component |
System.Windows.Forms. Control |
System.Windows.Forms. Control |
|
Cursor |
System.Windows.Forms.Cursor |
Dialog |
System.Windows.Forms.CommonDialog |
Dimension |
System.Drawing.Size |
Event |
System.EventArgs |
FileDialog |
System.Windows.Forms.FileDialog |
Font |
System.Drawing.Font |
Frame |
System.Windows.Forms.Form |
GradientPaint |
System.Drawing.Drawing2D.LinearGradientBrush |
Graphics |
System.Drawing.Graphics |
Graphics2D |
System.Drawing.Graphics |
Image |
System.Drawing.Image |
JobAttribute |
System.Drawing.Printing. PageSettings |
Label |
System.Windows.Forms.Label |
List |
System.Windows.Forms.ListBox |
Menu |
System.Windows.Forms.MainMenu |
MenuItem |
System.Windows.Forms.MenuItem |
PageAttributes |
System.Drawing.Printing. PageSettings |
Panel |
System.Windows.Forms. Panel |
Point |
System.Drawing.Point |
PopupMenu |
System.Windows.Forms.ContextMenu |
PrintJob |
System.Drawing.Printing.PrintDocument |
Rectangle |
System.Drawing.Rectangle |
Scrollbar |
System.Windows.Forms.HScrollbar System.Windows.Forms.VScrollbar |
ScrollPane |
System.Windows.Forms. Panel |
TextArea |
System.Windows.Forms. TextBox |
TextField |
System.Windows.Forms. TextBox |
TexturePaint |
System.Drawing.TextreBrush |
java.awt.event
java |
.net |
ActionEvent |
System.EventArgs |
AdjustmentEvent |
System.Windows.Forms.ScrollEventArgs |
ComponentEvent |
System.EventArgs |
ContainerEvent |
System.Windows.Forms.ControlEventArgs |
FocusEvent |
System.EventArgs |
ItemEvent |
System.EventArgs |
KeyEvent |
System.Windows.Forms.KeyPressEventArgs |
MouseEvent |
System.Windows.Forms.MouseEventArgs |
PaintEvent |
System.Windows.Forms.PaintEventArgs |
TextEvent |
System.EventArgs |
WindowEvent |
System.EventArgs |
java.awt.print
java |
.net |
PageFormat |
System.Drawing.Printing.PageSettings |
Paper |
System.Drawing.Printing.PageSize |
PrinterJob |
System.Drawing.Printing.PrintDocument |
- 顶
- 1
Java和C#基本类库的区别的更多相关文章
- Java中Set Map List 的区别
java中set map list的区别: 都是集合接口 简要说明 set --其中的值不允许重复,无序的数据结构 list --其中的值允许重复,因为其为有序的数据结构 map--成对的数据结构 ...
- [转]深入理解Java 8 Lambda(类库篇——Streams API,Collectors和并行)
以下内容转自: 作者:Lucida 微博:@peng_gong 豆瓣:@figure9 原文链接:http://zh.lucida.me/blog/java-8-lambdas-insideout-l ...
- Android(java)学习笔记156:Java虚拟机和Dalvik虚拟机的区别
Google于2007年底正式发布了Android SDK, 作为 Android系统的重要特性,Dalvik虚拟机也第一次进入了人们的视野.它对内存的高效使用,和在低速CPU上表现出的高性能,确实令 ...
- Java 的 I/O 类库的基本架构
Java 的 I/O 类库的基本架构 I/O 问题是任何编程语言都无法回避的问题,可以说 I/O 问题是整个人机交互的核心问题,因为 I/O 是机器获取和交换信息的主要渠道.在当今这个数据大爆炸时代, ...
- 深入理解Java 8 Lambda(类库篇——Streams API,Collectors和并行)
转载:http://zh.lucida.me/blog/java-8-lambdas-inside-out-library-features/ 关于 深入理解 Java 8 Lambda(语言篇——l ...
- Android(java)学习笔记99:Java虚拟机和Dalvik虚拟机的区别
Google于2007年底正式发布了Android SDK, 作为 Android系统的重要特性,Dalvik虚拟机也第一次进入了人们的视野.它对内存的高效使用,和在低速CPU上表现出的高性能,确实令 ...
- 教你如何理解JAVA的I/O类库
花括号MC(huakuohao-mc):关注JAVA基础编程及大数据,注重经验分享及个人成长. Java 的 I/O 流,说简单也简单,说复杂也复杂.复杂是因为进行一次常规的文件 I/O 操作通常要用 ...
- Java中Comparable和Comparator接口区别分析
Java中Comparable和Comparator接口区别分析 来源:码农网 | 时间:2015-03-16 10:25:20 | 阅读数:8902 [导读] 本文要来详细分析一下Java中Comp ...
- 转:Java中abstract和interface的区别
转自:Java中abstract和interface的区别 abstract class和interface是Java语言中对于抽象类定义进行支持的两种机制,正是由于这两种机制的存在,才赋予了Java ...
随机推荐
- sshpass 绕过ssh 密码交互式验证
经常我们使用脚本登入服务器的时候,如果使用ssh 命令,经常会提示密码输入,我们不得不手动输入密码,因为ssh 没有 密码的选项. 为了能绕过交互式验证,我们使用sshpass命令解决这个问题: 1. ...
- OpenResty 安装配置
0. 说明 1. Windows 下安装 下载软件包 openresty-1.13.6.1-win32.zip ,解压即可食用. [开启] 直接运行 nginx.exe 在 Windows 的命令窗口 ...
- Qt分页导航控件
最近在使用QTableWidget时,因为结果数量比较多而且又有单元格控件,为了改善效率要做分页处理.在网上找了一番,最后在http://www.cppblog.com/biao/archive/20 ...
- 乘风破浪:LeetCode真题_035_Search Insert Position
乘风破浪:LeetCode真题_035_Search Insert Position 一.前言 这次的问题比较简单,也没有限制时间复杂度,但是要注意一些细节上的问题. 二.Search Insert ...
- Asp.net core 2.0.1 Razor 的使用学习笔记(二)
ASP.net core 2.0.1 中 asp.net identity 2.0.1 的基本使用(一)—启用用户管理 一.修改和启用默认的用户账户管理和角色管理 在Data目录中添加Applicat ...
- PyQt5--Position
# -*- coding:utf-8 -*- ''' Created on Sep 13, 2018 @author: SaShuangYiBing ''' import sys from PyQt5 ...
- linux配置路径PATH问题
临时: 终端输入 export PATH=/myPath:$PATH 等号左右无空格 永久: 在用户家目录下即-目录, ...
- swift的多态
协议多态: 函数式编程多态:高阶函数的多态性: 泛型多态:泛型的基于约束编程: 共同点:相同的接口,不同的行为:
- ES6标准入门之字符串的拓展讲解
在开始讲解ES6中字符串拓展之前,我们先来看一下ES5中字符串的一些方法. 获取字符串长度 str.length 分割字符串 str.split() 拼接字符串 str1+str2 或 str1.co ...
- Spark项目之电商用户行为分析大数据平台之(二)CentOS7集群搭建
一.CentOS7集群搭建 1.1 准备3台centos7的虚拟机 IP及主机名规划如下: 192.168.123.110 spark1192.168.123.111 spark2192.168.12 ...