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 ...
随机推荐
- Linux基础知识与基础命令
Linux基础知识与基础命令 系统目录 Linux只有一个根目录,没有盘符的概念,文件目录是一个倒立的树形结构. 常用的目录功能 bin 与程序相关的文件 boot 与系统启动相关 cdrom 与Li ...
- 缓存那些事-zz
https://tech.meituan.com/cache_about.html 前言 一般而言,现在互联网应用(网站或App)的整体流程,可以概括如图1所示,用户请求从界面(浏览器或App界面)到 ...
- MySQL应用架构优化-实时数据处理
1.1. 场景 在和开发人员做优化的时候,讨论最多的应该是结合应用场景编写出合适的SQL.并培训开发应该如何编写SQL让MySQL的性能尽量好.但是有一些的场景对于SQL的优化是行不通的. 打个比方, ...
- JList动态添加元素
JList动态添加元素 http://www.cnblogs.com/tianguook/archive/2012/01/31/2333992.html https://zhuanlan.zhih ...
- mysql5.7.24启动报错:ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords.
报错原因是:密码过期.不管你是刚刚修改密码还是什么,只要登陆都是有问题的,都是报这样子的错误. 解决方法是: 1.修改/etc/my.cnf文件,在[mysqld]下加入“skip-grant-tab ...
- [luogu P4230]连环病原体
[luogu P4230] 连环病原体 题意 给定一个长度为 \(n\) 的边序列, 当这个序列的一个子区间内的边都加入图中时产生了环则称其为"加强区间", 求序列中的每条边在多少 ...
- Beta阶段第四次冲刺
Beta阶段第四次冲刺 严格按照Git标准来,组员有上传Git的才有贡献分没有的为0 代码签入图 1.part1 -站立式会议照片 2.part2 -项目燃尽图 3.part3 -项目进展 1.正在进 ...
- 原生js返回顶部(匀速、由快到慢)
在项目中我们经常有需求要求页面滚动到一定位置时出现返回顶部按钮,点击即返回顶部. 方法一: 锚点,这是最简单的.(a标签的href属性等于一直要到达位置元素的id值) 方法二: js直接给页面根节点设 ...
- python difflib.md
difflib 此模块提供了用于比较序列的类和函数.它可以用于例如比较文件,并且可以产生各种格式的差异信息,包括HTML和上下文以及统一差异. difflib 模块包含用于计算和处理序列间差异的工具. ...
- jupyter中添加conda环境
安装完Anaconda利用conda创建了虚拟环境,但是启动jupyter notebook之后却找不到虚拟环境. 实际上是由于在虚拟环境下缺少kernel.json文件,解决方法如下: 首先安装ip ...