1 前言 共有5道java基础知识的单项选择题,每道20分,共计100分.解析和答案在最后. 2 试题 2.1 如下程序运行结果是什么? class Parent { public Parent(String s) { System.out.print("B"); } } public class Son extends Parent { public Son(String s) { System.out.print("D"); } public static vo
1073 Scientific Notation (20 分) Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9].[0-9]+E[+-][0-9]+ which means that the integer portion has
1065 A+B and C (64bit)(20 分) Given three integers A, B and C in [−263,263], you are supposed to tell whether A+B>C. Input Specification: The first line of the input gives the positive number of test cases, T (≤10). Then T test cases follow, eac
1077 Kuchiguse (20 分) The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker's personality. Such a preference is called "Kuchiguse" and is of
PTA 7-1 邻接矩阵表示法创建无向图 (20分) 采用邻接矩阵表示法创建无向图G ,依次输出各顶点的度. 输入格式: 输入第一行中给出2个整数i(0<i≤10),j(j≥0),分别为图G的顶点数和边数. 输入第二行为顶点的信息,每个顶点只能用一个字符表示. 依次输入j行,每行输入一条边依附的顶点. 输出格式: 依次输出各顶点的度,行末没有最后的空格. 输入样例: 5 7 ABCDE AB AD BC BE CD CE DE 输出样例: 2 3 3 3 3 一道水题,无需建图也能AC,第一种方
在unix中时间戳是一串数字表示的,使用起来非常不方便,转化方式如下: //Convert Unix timestamp to normal date style public String TimeStamp2Date(String timestampString){ Long timestamp = Long.parseLong(timestampString)*1000; String date = new java.text.SimpleDateFormat("yyyy-MM-dd HH