基本数据型态转换成 StringString 类别中已经提供了将基本数据型态转换成 String 的 static 方法也就是 String.valueOf() 这个参数多载的方法有下列几种String.valueOf(boolean b) : 将 boolean 变量 b 转换成字符串String...
分类:
其他好文 时间:
2015-01-19 00:09:25
阅读次数:
261
首先上题目:A DNA sequence can be represented as a string consisting of the letters A, C, G and T, which correspond to the types of successive nucleotides i...
分类:
其他好文 时间:
2015-01-19 00:02:29
阅读次数:
254
public void testDriverManager() throws Exception{ //1. 准备连接数据库的 4 个字符串. //驱动的全类名. String driverClass = "com.mysql.jdbc.Driver"; ...
分类:
数据库 时间:
2015-01-19 00:00:09
阅读次数:
421
结论:1.父类(基本类)转子类(扩展类),报错 2.子类(扩展类)转父类(基本类),成功实验如下:父类(基本类)public class Person { private String name; private String doc; public String getName...
分类:
其他好文 时间:
2015-01-19 00:00:09
阅读次数:
342
https://oj.leetcode.com/problems/longest-substring-without-repeating-characters/Given a string, find the length of the longest substring without repea...
分类:
其他好文 时间:
2015-01-18 23:57:54
阅读次数:
264
class Res {
String name;
String sex;
}
class Input implements Runnable {
private Res r;
public Input(Res r) {
// TODO Auto-generated constructor stub
this.r = r;
}
public void run() {
i...
分类:
编程语言 时间:
2015-01-18 22:49:16
阅读次数:
322
package com.latrobe.spark
import org.apache.spark.{SparkContext, SparkConf}
/**
* Created by spark on 15-1-18.
*/
object FlatMapValues {
def main(args: Array[String]) {
val conf = new SparkC...
分类:
其他好文 时间:
2015-01-18 22:43:54
阅读次数:
384
/* java.lang.String 是字符串类型 注意:只要采用双引号赋值字符串,那么在编译期将会放到方法区中的字符串的常量池里, 如果是运行时对字符串.加或相减会放到堆中(放之前会先验证方法区中是否含有 相同的字符串常量,如果存...
分类:
编程语言 时间:
2015-01-18 22:41:01
阅读次数:
319
什么是连接?连接,是我们的编程语言与数据库交互的一种方式。我们经常会听到这么一句话“数据库连接很昂贵“。有人接受这种说法,却不知道它的真正含义。因此,下面我将解释它究竟是什么。[如果你已经知道了,你可以跳到它的工作原理部分]创建连接的代码片段:String connUrl = "jdbc:mysql...
分类:
编程语言 时间:
2015-01-18 22:32:48
阅读次数:
280
/* 获取当前的毫秒数 1S = 1000毫秒*/public class DateTest01{ public static void main(String[] args){ long now = System.currentTim...
分类:
编程语言 时间:
2015-01-18 22:27:51
阅读次数:
343