码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
Java面向对象小记(1)
1.创建类Person创建对象的内存划分图:对属性赋值,操作为对象.属性=赋值。classPerson{ Stringname; intage; publicvoidtell(){ System.out.println("name:"+name+""+"age:"+age); } } publicclassMethodDemo01{ publicstaticvoidmain(String[]args){ Personper=nul..
分类:编程语言   时间:2015-06-06 23:39:51    阅读次数:167
JS之——比较字符串大小(插曲)
与操作字符串有关的最后一个方法是localeCompare(),这个方法比较两个字符串,并返回下列值中的一个: 如果字符串在字母中应该排在字符串参数之前,则返回一个负数(大多数情况下是-1)。如果字符串等于字符串参数,则返回0。如果字符串在字母表中应该排在字符串参数之后,则返回一个正数(大多数情况下返回1)。 var stringValue = "yellow"; alert(string...
分类:Web程序   时间:2015-06-06 23:35:37    阅读次数:119
leetcode 22 -- Generate Parentheses
Generate Parentheses 题目: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: “((()))”, “(()(...
分类:其他好文   时间:2015-06-06 23:33:17    阅读次数:120
C# - 正则表达式
验证电话号码的主要代码如下:public bool IsTelephone(string str_telephone){return System.Text.RegularExpressions.Regex.IsMatch(str_telephone, @"^(\d{3,4}-)?\d{6,8}$"...
分类:Windows程序   时间:2015-06-06 23:29:03    阅读次数:206
再回首,Java温故知新(八):Java基础之字符串
字符串是Java中使用频率最高的类,但是它却不属于基本类型,而是预定义了String类来表示。从String类的源码可以看到,String是基于char[]实现的,而且Java中的String是不可变字符串,即String初始化之后不可更改。 估计到这就有人问了,字符串不是都可以改的吗?下面两...
分类:编程语言   时间:2015-06-06 23:22:37    阅读次数:204
Android---54---WebView初学
webView 组件本身就是一个浏览器实现,它的内核基于WebKit   1.使用WebView浏览网页: 常用方法: void goBack():后退  void goForward():前进 void loadUrl (String url):加载指定的URL对应的网页 void loadUrl("file:///android_asset/XX.html"):加载本地文件  ...
分类:移动开发   时间:2015-06-06 22:09:01    阅读次数:201
Java 自学笔记-基本语法3setOut()方法设置新的输出流
1 package hahaa; 2 3 import java.io.FileNotFoundException; 4 import java.io.PrintStream; 5 6 public class ha { 7 public static void main(String...
分类:编程语言   时间:2015-06-06 22:02:32    阅读次数:131
【leetcode】Palindrome Partitioning
Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.For example,...
分类:其他好文   时间:2015-06-06 21:57:41    阅读次数:122
leetcode:String to Integer (atoi)
Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases.Notes:It is intended for this problem to be specified ...
分类:其他好文   时间:2015-06-06 21:54:58    阅读次数:117
[Guava源码阅读笔记]-Basic Utilities篇-1
写该系列文章的目的是记录Guava源码中个人感觉不错且值得借鉴的内容。 一、MoreObjects类 //MoreObjects.ToStringHelper类的toString()方法:对于字符串拼接的写法蛮不错的,此前本人一直用比较挫的方式:不管三七二一,先拼接然后再subString() @Override public String toString() { /...
分类:其他好文   时间:2015-06-06 20:46:37    阅读次数:311
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!