自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 资源 (3)
  • 收藏
  • 关注

原创 Java反射基本概述及使用方法

反射概述:        反射机制就是在运行状态中,对任意一个类,都能够知道这个类的所有属性及    方法;对任意一个对象,都能调用任意的方法或属性。这种动态获取信息及动态调    用对象方法的功能称作Java语言的反射机制。 就是通过class文件对象,去使用该文件中的成员变量,构造方法,成员方法。 获取class文件的三种方式 1.通过Object类的getClass()方法 Person...

2018-03-31 18:53:25 1093

原创 LeetCode-5. Longest Palindromic Substring

Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example:Input: "babad"Output: "bab"Note: "aba" is also a valid answer. Example:I...

2018-03-25 19:01:42 335

原创 Java线程的生命周期 图解

线程的生命周期(参照下图线程生命周期图解.bmp) A:新建 创建线程对象 B:就绪 有执行资格,没有执行权 C:运行 有执行资格,也有执行权 D:阻塞 因为一些操作使线程处于阻塞状态,即既没执行资格,又没执行权 而另外一些操作可以将它激活,使之变成就绪状态 E:死亡 线程对象变成垃圾,等待被回收线程生命周期图解.bmp...

2018-03-25 16:35:11 627

原创 JAVA IO流: PrintStream和PrintWriter

字节打印流 PrintStream字符打印流 PrintWriterPrintWriter与PrintStream的区别:作为处理流使用时,PrintStream只能封装OutputStream类型的字节流,而PrintWriter既可以封装OutputStream类型的字节流,还能够封装Writer类型的字符输出流并增强其功能。特点: A:只操作目的地,不操作数据源 B:可以操作任意类型的数...

2018-03-25 15:12:54 590

转载 JAVA 根据经纬度计算地球上任意两点距离GPS

[java] view plain copy/**  * Created by yuliang on 2015/3/20.  */  public class LocationUtils {      private static double EARTH_RADIUS = 6378.137;  //地球半径      private static double rad(double d) {  ...

2018-03-25 14:59:16 1594

原创 Java多线程同步锁问题

一、引入问题 1.电影院卖票程序[java] view plain copy/*  * 电影院卖100张电影票,一共3个窗口同时卖票。  */  public class MyRunnable implements Runnable{      private int tickets=100;            public void run() {          while(true) ...

2018-03-24 20:14:22 887

原创 Java中的序列化和反序列化笔记及小注意事项

序列化流 ObjectInputStream,ObjectOutputStream1.概念:  序列化(ObjectOutputStream):可以把对象按照刘一样的方式写入文本文件或者在网络中传输  反序列化(ObjectInputStream):把文本文件中或网络中的流对象数据还原成对象 2.如何实现序列化呢?    让被序列化的对象所属类实现序列化接口Serializable。    该接...

2018-03-21 17:27:43 672

原创 Java序列化读写多个对象的方法

Person类用来序列化 public class Person implements Serializable{ private String name; private int age; public Person(String name, int age) { super(); this.name = name; this.age = age; } }方法一:存入文件时,...

2018-03-21 16:19:51 8025 6

原创 LeetCode-442.Find All Duplicates in an Array

Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements that appear twice in this array.Could you do it without extra spac...

2018-03-20 21:45:07 435

原创 LeetCode-537. Complex Number Multiplication

Given two strings representing two complex numbers.You need to return a string representing their multiplication. Note i2 = -1 according to the definition.Example 1:Input: "1+1i", "1+1i"Output: "0+2i...

2018-03-20 21:36:31 226

原创 Java中IO流总结笔记

IO流 |--字节流         |--字节输入流     InputStream int read():一次读取一个字节 int read(byte[] bys):一次读取一个字节数组 |--FileInputStream |--BufferedInputStream         |--字节输出流     OutputStream void w...

2018-03-17 17:50:50 452

原创 Java各种集合各自特点和数据结构

Collection 单列集合 |-List 有序,可重复 |-ArrayList 底层是数组,查询快,增删慢 线程不安全,效率高 |-Vector 底层是数组,查询快,增删慢 线程安全,效率低 |-LinkedList 底层是链表,查询慢,增删快 线程不安全,效率高 |-Set 无序,唯一 |-HashSet 底层是哈希表 哈希表唯一依赖两个方法:h...

2018-03-11 22:17:36 1049

原创 Java中如何选择使用哪种集合

是否有键值对关系{ 是:Map 键是否需要排序?{ 是:TreeMap 否:HashMap 不知道就用HashMap } 否:Collection 元素是否唯一?{ 是:Set 元素是否需要排序?{ 是:TreeSet 否:HashSet } 否:List 线程安全吗?{ 是:Vector ...

2018-03-11 22:16:08 1476

原创 LeetCode-763. Partition Labels

A string S of lowercase letters is given. We want to partition this string into as many parts as possible so that each letter appears in at most one part, and return a list of integers representing th...

2018-03-10 20:57:22 417

原创 LeetCode-654. Maximum Binary Tree

Given an integer array with no duplicates. A maximum tree building on this array is defined as follow:The root is the maximum number in the array.The left subtree is the maximum tree constructed from ...

2018-03-09 19:22:25 288

原创 LeetCode-771. Jewels and Stones

You're given strings J representing the types of stones that are jewels, and S representing the stones you have.  Each character inS is a type of stone you have.  You want to know how many of the ston...

2018-03-09 19:18:34 256

SSM_CRM项目资源

具有ssm,Bootstrap所需jar包、静态页面资源css,js,jsp,fonts等、数据库配置sql文件、tld分页组件

2018-11-04

ssm整合全部jar包

SSM框架整合全部jar包,Spring,SpringMvc,Mybatis整合

2018-08-08

JDBC连接使用的包与DBUtils工具包

JDBC连接使用的包与DBUtils工具包,包含:mysql-connector-java-5.1.37-bin.jar和commons-dbutils-1.6.jar

2018-04-16

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除