Summary of Java basics review data】的更多相关文章

1.标识符      用于命名程序的对象,如方法名,变量名,规则是: a.大小写敏感 b.由英文字符,文字字符,美元符号,下划线和数字组成,但不能以数字开头 c.不能是关键字 2.%:求余运算符    23%-4 结果为3,注:余数的符号与除数保持一致 3.++i:先引用变量i,后再执行i+1赋值给i作为运算结果 i++:先执行i加1,然后再将结果赋值给i作为运算结果进行引用 4.数组的命名三种 a.int  intArray[ ]; intArray=new   int[5]; b.int  …
mysql 报这个异常:java.sql.SQLException: Data truncation: Truncated incorrect DOUBLE value update 表名 set col1 = ?  and col2 = ? where id = ? 改为: update 表名 set col1 = ?  , col2 = ? where id = ? 用逗号隔开…
1, Process&Threads Most implementations of the Java virtual machine run as a single process. Threads exist within a process — every process has at least one. Threads share the process's resources, including memory and open files. This makes for effic…
除了Java collection class/interface外,方便的有Google guava的utility class: Lists/Sets/Maps/Queues, 用它们可以方便地创建List等object. List<String> list = Lists.newArrayList(); or Lists.newArrayList("1", "2"); ArrayList v.s. Vector: 两者都是implement了Lis…
Java’s stream classes are good for streaming sequences of bytes, but they’re not good for streaming sequences of characters because bytes and characters are two different things. A -bit data item and a character represents a -bit data item. Also, Jav…
Good about Java: friendly syntax, memory management[GC can collect unreferenced memory resources], object-oriented features, portability. Stack Stores method invocations, local variables(include object reference, but the object itself is still stored…
For every type of object, the Java virtual machine instantiates an immutable instance of java.lang.Class which provides methods to examine the runtime properties of the object including its members and type information. Class also provides the abilit…
Spring data mongodb 查询出结果的时候会自动 + 8小时,所以我们看起来结果是对的 但是我们查询的时候,并不会自动 + 8小时,需要自己处理 解决方法 1   @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") 但是此注解,仅针对json 数据转换的时候处理,如果是form 提交 urlencoded 的时候就没办法了 @Transient @JsonDeserializ…
在使用项目将数据存储到 datetime 的字段 ,抛出了这个异常 而我是使用Java.util.Date 存储过去的 解决代码如下: Date date = new Date(); demo.setLastSeason(new Timestamp(date.getTime()));…
1.oracle: 1.1 增:insert into 删:delete from 改:update tablename set 查:select * from 1.2 聚合函数 max,min,avg,ceil,floor,round 1.3 order by:必须要写在sql语句的最后(where之后) group by:如果使用group by,在select后就必须要有该字段,而且group by不能和where连用,只能和having连用 1.4 多表联查 left join:以左表为…