mysql、sqlserver数据库常见数据类型对应java中的的类型探究

时间:2022-12-20 13:30:49

linux环境,JAVA_HOME/bin目录中有很多有用的命令:jps、jstat、jinfo、jmap、jhat、jstack。本文以监听2181端口的zookeeper应用为例讲解。

特别提醒下,在windows平台,这些命令以.exe结尾,也都可以在cmd命令行窗口执行。

jps:虚拟机进程状况工具

jps -mlv

如下:

[root@centos4 bin]# jps -mlv
1366 org.apache.zookeeper.server.quorum.QuorumPeerMain ../config/zookeeper.properties -Xmx512M -Xms512M -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+DisableExplicitGC -Djava.awt.headless=true -Xloggc:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../logs/zookeeper-gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dkafka.logs.dir=/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../logs -Dlog4j.configuration=file:./../config/log4j.properties
2839 kafka.Kafka ../config/server.properties -Xmx1G -Xms1G -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+DisableExplicitGC -Djava.awt.headless=true -Xloggc:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../logs/kafkaServer-gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dkafka.logs.dir=/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../logs -Dlog4j.configuration=file:./../config/log4j.properties
6167 sun.tools.jps.Jps -mlv -Dapplication.home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64 -Xms8m

jstat:虚拟机统计信息监视工具

[root@centos4 bin]# jstat
invalid argument count
Usage: jstat -help|-options
jstat -<option> [-t] [-h<lines>] <vmid> [<interval> [<count>]] Definitions:
<option> An option reported by the -options option
<vmid> Virtual Machine Identifier. A vmid takes the following form:
<lvmid>[@<hostname>[:<port>]]
Where <lvmid> is the local vm identifier for the target
Java virtual machine, typically a process id; <hostname> is
the name of the host running the target Java virtual machine;
and <port> is the port number for the rmiregistry on the
target host. See the jvmstat documentation for a more complete
description of the Virtual Machine Identifier.
<lines> Number of samples between header lines.
<interval> Sampling interval. The following forms are allowed:
<n>["ms"|"s"]
Where <n> is an integer and the suffix specifies the units as
milliseconds("ms") or seconds("s"). The default units are "ms".
<count> Number of samples to take before terminating.
-J<flag> Pass <flag> directly to the runtime system.

可选的option可通过jstat options查看,如下:

[root@centos4 bin]# jstat -options
-class
-compiler
-gc
-gccapacity
-gccause
-gcmetacapacity
-gcnew
-gcnewcapacity
-gcold
-gcoldcapacity
-gcutil
-printcompilation

最常用的是-gcutil。

jinfo:Java配置信息工具

[root@centos4 app]# jinfo
Usage:
jinfo [option] <pid>
(to connect to running process)
jinfo [option] <executable <core>
(to connect to a core file)
jinfo [option] [server_id@]<remote server IP or hostname>
(to connect to remote debug server) where <option> is one of:
-flag <name> to print the value of the named VM flag
-flag [+|-]<name> to enable or disable the named VM flag
-flag <name>=<value> to set the named VM flag to the given value
-flags to print VM flags
-sysprops to print Java system properties
<no option> to print both of the above
-h | -help to print this help message

jinfo后面如果不跟任何option,直接跟pid的话,会打印出VM信息和系统信息,最全。如下:

[root@centos4 app]# jinfo 1366
Attaching to process ID 1366, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.191-b12
Java System Properties: com.sun.management.jmxremote.authenticate = false
java.runtime.name = OpenJDK Runtime Environment
java.vm.version = 25.191-b12
sun.boot.library.path = /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/lib/amd64
java.vendor.url = http://java.oracle.com/
java.vm.vendor = Oracle Corporation
path.separator = :
java.rmi.server.randomIDs = true
file.encoding.pkg = sun.io
java.vm.name = OpenJDK 64-Bit Server VM
sun.java.launcher = SUN_STANDARD
user.country = US
user.dir = /home/koushengrui/app/kafka_2.11-0.10.2.0/bin
java.vm.specification.name = Java Virtual Machine Specification
java.runtime.version = 1.8.0_191-b12
os.arch = amd64
java.endorsed.dirs = /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/lib/endorsed
line.separator =
java.vm.specification.vendor = Oracle Corporation
os.name = Linux
log4j.configuration = file:./../config/log4j.properties
sun.jnu.encoding = UTF-8
java.library.path = /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
java.specification.name = Java Platform API Specification
java.class.version = 52.0
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
os.version = 3.10.0-693.el7.x86_64
user.home = /root
user.timezone = Asia/Shanghai
java.awt.printerjob = sun.print.PSPrinterJob
file.encoding = UTF-8
java.specification.version = 1.8
user.name = root
java.class.path = :/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/aopalliance-repackaged-2.5.0-b05.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/argparse4j-0.7.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/connect-api-0.10.2.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/connect-file-0.10.2.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/connect-json-0.10.2.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/connect-runtime-0.10.2.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/connect-transforms-0.10.2.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/guava-18.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/hk2-api-2.5.0-b05.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/hk2-locator-2.5.0-b05.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/hk2-utils-2.5.0-b05.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jackson-annotations-2.8.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jackson-annotations-2.8.5.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jackson-core-2.8.5.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jackson-databind-2.8.5.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jackson-jaxrs-base-2.8.5.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jackson-jaxrs-json-provider-2.8.5.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jackson-module-jaxb-annotations-2.8.5.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/javassist-3.20.0-GA.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/javax.annotation-api-1.2.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/javax.inject-1.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/javax.inject-2.5.0-b05.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/javax.servlet-api-3.1.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/javax.ws.rs-api-2.0.1.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jersey-client-2.24.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jersey-common-2.24.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jersey-container-servlet-2.24.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jersey-container-servlet-core-2.24.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jersey-guava-2.24.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jersey-media-jaxb-2.24.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jersey-server-2.24.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jetty-continuation-9.2.15.v20160210.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jetty-http-9.2.15.v20160210.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jetty-io-9.2.15.v20160210.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jetty-security-9.2.15.v20160210.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jetty-server-9.2.15.v20160210.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jetty-servlet-9.2.15.v20160210.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jetty-servlets-9.2.15.v20160210.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jetty-util-9.2.15.v20160210.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/jopt-simple-5.0.3.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/kafka_2.11-0.10.2.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/kafka_2.11-0.10.2.0-sources.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/kafka_2.11-0.10.2.0-test-sources.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/kafka-clients-0.10.2.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/kafka-log4j-appender-0.10.2.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/kafka-streams-0.10.2.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/kafka-streams-examples-0.10.2.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/kafka-tools-0.10.2.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/log4j-1.2.17.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/lz4-1.3.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/metrics-core-2.2.0.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/osgi-resource-locator-1.0.1.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/reflections-0.9.10.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/rocksdbjni-5.0.1.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/scala-library-2.11.8.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/scala-parser-combinators_2.11-1.0.4.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/slf4j-api-1.7.21.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/slf4j-log4j12-1.7.21.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/snappy-java-1.1.2.6.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/validation-api-1.1.0.Final.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/zkclient-0.10.jar:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../libs/zookeeper-3.4.9.jar
kafka.logs.dir = /home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../logs
java.vm.specification.version = 1.8
sun.java.command = org.apache.zookeeper.server.quorum.QuorumPeerMain ../config/zookeeper.properties
java.home = /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre
user.language = en
java.vm.info = mixed mode
java.version = 1.8.0_191
file.separator = / VM Flags:
Non-default VM flags: -XX:CICompilerCount=4 -XX:ConcGCThreads=2 -XX:+DisableExplicitGC -XX:G1HeapRegionSize=1048576 -XX:InitialHeapSize=536870912 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ManagementServer -XX:MarkStackSize=4194304 -XX:MaxGCPauseMillis=20 -XX:MaxHeapSize=536870912 -XX:MaxNewSize=321912832 -XX:MinHeapDeltaBytes=1048576 -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC
Command line: -Xmx512M -Xms512M -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+DisableExplicitGC -Djava.awt.headless=true -Xloggc:/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../logs/zookeeper-gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dkafka.logs.dir=/home/koushengrui/app/kafka_2.11-0.10.2.0/bin/../logs -Dlog4j.configuration=file:./../config/log4j.properties

jmap:Java堆内存映射工具

[root@centos4 bin]# jmap
Usage:
jmap [option] <pid>
(to connect to running process)
jmap [option] <executable <core>
(to connect to a core file)
jmap [option] [server_id@]<remote server IP or hostname>
(to connect to remote debug server) where <option> is one of:
<none> to print same info as Solaris pmap
-heap to print java heap summary
-histo[:live] to print histogram of java object heap; if the "live"
suboption is specified, only count live objects
-clstats to print class loader statistics
-finalizerinfo to print information on objects awaiting finalization
-dump:<dump-options> to dump java heap in hprof binary format
dump-options:
live dump only live objects; if not specified,
all objects in the heap are dumped.
format=b binary format
file=<file> dump heap to <file>
Example: jmap -dump:live,format=b,file=heap.bin <pid>
-F force. Use with -dump:<dump-options> <pid> or -histo
to force a heap dump or histogram when <pid> does not
respond. The "live" suboption is not supported
in this mode.
-h | -help to print this help message
-J<flag> to pass <flag> directly to the runtime system

jmap -heap pid:打印堆信息。从中可以看出使用的垃圾收集器、堆的配置及其使用情况。如下:

[root@centos4 bin]# jmap -heap 1366
Attaching to process ID 1366, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.191-b12 using thread-local object allocation.
Garbage-First (G1) GC with 8 thread(s) Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 536870912 (512.0MB)
NewSize = 1363144 (1.2999954223632812MB)
MaxNewSize = 321912832 (307.0MB)
OldSize = 5452592 (5.1999969482421875MB)
NewRatio = 2
SurvivorRatio = 8
MetaspaceSize = 21807104 (20.796875MB)
CompressedClassSpaceSize = 1073741824 (1024.0MB)
MaxMetaspaceSize = 17592186044415 MB
G1HeapRegionSize = 1048576 (1.0MB) Heap Usage:
G1 Heap:
regions = 512
capacity = 536870912 (512.0MB)
used = 1856512 (1.7705078125MB)
free = 535014400 (510.2294921875MB)
0.34580230712890625% used
G1 Young Generation:
Eden Space:
regions = 0
capacity = 28311552 (27.0MB)
used = 0 (0.0MB)
free = 28311552 (27.0MB)
0.0% used
Survivor Space:
regions = 0
capacity = 0 (0.0MB)
used = 0 (0.0MB)
free = 0 (0.0MB)
0.0% used
G1 Old Generation:
regions = 2
capacity = 508559360 (485.0MB)
used = 1856512 (1.7705078125MB)
free = 506702848 (483.2294921875MB)
0.36505315721649484% used 3009 interned Strings occupying 242720 bytes.

jmap -histo pid:打印堆中的对象信息。jmap -histo:live:打印堆中存活的对象信息。如下:

[root@centos4 bin]# jmap -histo 1366

 num     #instances         #bytes  class name
----------------------------------------------
1: 6703 509448 [C
2: 910 452864 [I
3: 1889 214352 java.lang.Class
4: 525 207248 [B
5: 6665 159960 java.lang.String
6: 2816 110784 [Ljava.lang.Object;
........................................................
725: 1 16 sun.util.resources.LocaleData
726: 1 16 sun.util.resources.LocaleData$LocaleDataResourceBundleControl
Total 39669 2380888

num是根据bytes由大到小排列的排名。instances表示同一个class name的对象的个数。bytes是同一个class name的对象的总大小。class name是全类名。

jmap -finalizerinfo pid:打印待回收的对象信息。如下:

[root@centos4 bin]# jmap -finalizerinfo 1366
Attaching to process ID 1366, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.191-b12
Number of objects pending for finalization: 0

jmap -dump:<dump-options>:dump堆信息,生成二进制的heap dump文件,俗称堆转储文件。dump是转储的意思。dump文件名可以自定义。如:

[root@centos4 bin]# jmap -dump:format=b,file=zookeeper_201907112135.dump 1366
Dumping heap to /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/bin/zookeeper_201907112135.dump ...
Heap dump file created

heap dump文件怎么用呢?由于heap dump文件是二进制文件,所以不能直接用文本编辑器打开。把heap dump文件从服务器down下来后,常用打开方式有两种:

用VisualVM打开或者用MAT打开。

用VisualVM打开步骤:双击JAVA_HOME/bin目录中的jvisualvm.exe打开Java VisualVM工具,点击左上角打开,装入,文件类型选择堆 Dump,然后选择刚刚的堆转储文件,就打开了。然后在概要处就可以看到基本信息、环境、系统属性以及堆转储上的线程信息,在类处可以看到所有的类以及每个类的实例数以及各类实例大小和占堆空间的比例。

如果dump文件特别大,就需要用MAT打开了。MAT全称是Eclipse Memory Analyzer,是eclipse官方出的一个独立插件。从官网下载好后,解压,直接双击MemoryAnalyzer.exe即可运行,不用依赖eclipse。左上角File,Open Heap Dump,选择刚刚的堆转储文件,打开。在Overview中可以看到有Actions、Reports、Step By Step,Actions下面有Histogram(列出了各类实例数量及占用内存大小)、Dominator Tree(列出了最大的对象)、Top Consumers(根据类名和包名分组,打印出最昂贵的对象)。Reports下面有Leak Suspects(列出了可能的内存泄露点)。

jstack:java堆栈跟踪工具

[root@centos4 bin]# jstack
Usage:
jstack [-l] <pid>
(to connect to running process)
jstack -F [-m] [-l] <pid>
(to connect to a hung process)
jstack [-m] [-l] <executable> <core>
(to connect to a core file)
jstack [-m] [-l] [server_id@]<remote server IP or hostname>
(to connect to a remote debug server) Options:
-F to force a thread dump. Use when jstack <pid> does not respond (process is hung)
-m to print both java and native frames (mixed mode)
-l long listing. Prints additional information about locks
-h or -help to print this help message

jstack pid:dump运行的进程的线程信息。如果进程hung住了,需要加-F参数来强制dump。jstack -F pid:dump hung住进程的线程信息。这两个命令都默认把信息输出到当前命令行,我们一般都会输出到指定文件,jstack pid > thread201907121424.dump。这样就会在当前目录中生成thread201907121424.dump文件。down下来分析即可。dump线程生成的文件一般称为线程转储文件。线程转储文件可以直接用文本编辑器如notepad++打开,打开后可以看到dump瞬间所有的线程及其状态。由此可知,当我们自己创建线程或者线程池时,给线程命名是多么好的习惯啊,可以快速在大量的线程中找到自己命名的线程。从中还可以看到大量的Unsafe、LockSupport、AQS、CountDownLatch的API,所以学好这些类是必需的。

mysql、sqlserver数据库常见数据类型对应java中的的类型探究的更多相关文章

  1. MySql数据库类型bit等与JAVA中的对应类型【布尔类型怎么存】

    用char(1):可以表示字符或者数字,但是不能直接计算同列的值.存储消耗1个字节 用tinyint:只能表示数字,可以直接计算,存储消耗2个字节 用bit: 只能表示0或1,不能计算,存储消耗小于等 ...

  2. 关于MySQL的TinyInt数据类型在Delphi中作为Boolean类型的一个要注意的问题

    关于MySQL的TinyInt数据类型在Delphi中作为Boolean类型的一个要注意的问题: 在定义TinyInt类型字段时,若要作为Delphi中作为Boolean类型,则该字段的长度必须为1!

  3. Java中的枚举类型详解

    枚举类型介绍 枚举类型(Enumerated Type) 很早就出现在编程语言中,它被用来将一组类似的值包含到一种类型当中.而这种枚举类型的名称则会被定义成独一无二的类型描述符,在这一点上和常量的定义 ...

  4. 1 Java中的时间类型

    总结:sql中的时间转 util的时间直接赋值即可:反过来,必须先吧util下的时间转换成毫秒,再通过sql的构造器生成sql的时间格式. 1 Java中的时间类型 java.sql包下给出三个与数据 ...

  5. 详解java中的byte类型

    Java也提供了一个byte数据类型,并且是基本类型.java byte是做为最小的数字来处理的,因此它的值域被定义为-128~127,也就是signed byte.下面这篇文章主要给大家介绍了关于j ...

  6. 全面解读Java中的枚举类型enum的使用

    这篇文章主要介绍了Java中的枚举类型enum的使用,开始之前先讲解了枚举的用处,然后还举了枚举在操作数据库时的实例,需要的朋友可以参考下 关于枚举 大多数地方写的枚举都是给一个枚举然后例子就开始sw ...

  7. 深入理解java中的byte类型

    作者 | 进击的石头--GO! 来源 | https://www.cnblogs.com/zl181015/p/9435035.html#4432849 Java也提供了一个byte数据类型,并且是基 ...

  8. java中的null类型---有关null的9件事

    摘自 https://blog.csdn.net/qq_25077777/article/details/80174763 今天听到一个问题,java中的null类型,null竟然是一种类型 java ...

  9. Java中的集合类型体系(一)

    Java中的集合类型体系(一) 提问:为什么需要集合? 通常情况下,程序需要根据运行时才知道创建了多少对象.若非程序运行时,而在开发阶段,我们并不知道创建了多少对象,甚至不知道对象的准确类型,为了满足 ...

随机推荐

  1. EventBus3&period;0源码解析

    本文主要介绍EventBus3.0的源码 EventBus是一个Android事件发布/订阅框架,通过解耦发布者和订阅者简化 Android 事件传递. EventBus使用简单,并将事件发布和订阅充 ...

  2. windows环境 andorid JNI开发

    1.下载并安装GNUstep 下载地址:http://www.gnustep.org/experience/Windows.html 安装文件 a.GNUstep MSYS System   b.GN ...

  3. python学习道路&lpar;day8note&rpar;&lpar;抽象类,类的方法,异常处理,socket编程&rpar;

    1.#面向对象 #抽象接口 === 抽象类 #就是架构师给你一个架子,你们去写,如果满足不了直接报错 #python2 print("python2---抽象类".center(2 ...

  4. AC日记——画矩形 1&period;5 42

    42:画矩形 总时间限制:  1000ms 内存限制:  65536kB 描述 根据参数,画出矩形. 输入 输入一行,包括四个参数:前两个参数为整数,依次代表矩形的高和宽(高不少于3行不多于10行,宽 ...

  5. docker-3 基础命令

    创建镜像 创建镜像的方法有三种: 基于已有的容器创建 基于本地模板导入 基于dockerfile 基于已有的容器创建 主要使用docker commit 命令,命令格式: docker commit ...

  6. &lt&semi;转载&gt&semi;gcc&sol;g&plus;&plus;编译

    转载于:http://www.cnblogs.com/yc_sunniwell/archive/2010/07/22/1782678.html 1. gcc/g++在执行编译工作的时候,总共需要4步 ...

  7. 理解C&num;系列 &sol; 核心C&num; &sol; 判断&amp&semi;循环&amp&semi;跳转

    判断&循环&跳转 说明 本节写的是C#语言的控制程序流的语句,“控制程序流”就是控制程序运行流程的意思. 判断 很容易理解:如果……就…… if语句:测试特定条件是否满足,如果满足就执 ...

  8. Nodejs in Visual Studio Code 13&period;构建单页应用Scrat示例挖一挖

    1.开始 Scrat作者说要搞个很碉堡的示例,果然就搞出来了,如果要学习并使用Scrat,可以从官方示例开始,简直太方便了. 2.Scrat示例 目录 component_modules : 公共组件 ...

  9. spark集成hbase与hive数据转换与代码练习

    帮一个朋友写个样例,顺便练手啦~一直在做平台的各种事,但是代码后续还要精进啊... import java.util.Date import org.apache.hadoop.hbase.HBase ...

  10. 计算机硬件&amp&semi;操作系统

    一.计算机的硬件: 控制器:计算机的指挥系统 运算器:数学运算+逻辑运算 存储器I/O设备:存I取O数据   内存(内存条):短期记忆,速度快,但是断电数据会丢失:   外存(硬盘):永久记忆,速度非 ...