`
holoblog
  • 浏览: 1264163 次
博客专栏
E0fcf0b7-6756-3051-9a54-90b4324c9940
SQL Server 20...
浏览量:19538
文章分类
社区版块
存档分类
最新评论
文章列表
/////////////////////////////java文件中的public 类publicTest.javaclass A{public static void main(String [] args){System.out.println("hello");}}public class PublicTest{}///////这里编译会通过,不过运行时会给出缺省main函数的提示~~~~~~~~~~~~~~~在MainClass.java中class sub{String a;int num;sub(){a = "Hello";num = 3; ...
////////////////////构造函数不能声明为静态。 关于静态与非静态的方法 MainClass.javaclass sub{String a;int num;sub(){a = "Hello";num = 3;}} public class MainClass{String t;sub s;///这样写没有错误。MainClass(){s = new sub();t = "hhh"; }public static void main(String []arg){MainClass mc = new MainClass();System.o ...
一个类的实现:(1)当装载这个类的时候,实际上是调用的类的static方法或者访问类的static字段的时候,java解释器会搜寻classpath来找到这个类(2)装载类后,会对static数据进行初始化。(3)当用new创建一个新对象时,会在堆中为对 ...
boolean [] a;a = new boolean [] {true,false};System.out.println(a[0]+" "+a[1]); //this is right.System.out.println(a[0]+a[1]); //this is wrong. Because two boolean can't add .System.out.println(a[0],a[1]); //this is also wrong. Because the function can't take two paraments take two parament ...
////////break和continu只能跳出一层循环。///////如果前面加上标签,就可以随意跳出循环outer:while(true) {while(true) {i++;System.out.println("i = " +i);if(i == 1) {System.out.println("continue");continue;}if(i == 3) {System.out.println("continuecontinue outer;////////这里可以跳到最外层循环再循环。}if(i == 5) {System.out. ...
第一个程序: public class Hello { public static void main(String[] args) { System.out.println("Hello"); } } 算术符号:<<左移 低位填充零>>右移 这是符号右移,如果为正则高位填充零,如果为负高位填充一>>>右移 不管是否为负,高位均填零char byte short进行移位时先转化为int他们进行运算时也是先转换为int型了 浮点数系统能表示的精度 2*(M-m+1)*b^(p-1)+1IEEE使用:M=10 ...
//System Shedule Algorithm//include the Priority First Algorithm and the Time Slice Algorithm//Version 2.0//author:chillyCreator #include<string>#include<iostream>#include<iomanip>using namespace std; class process{private:string name;//the name of processint pri;//the priority ...
ex6.html <html><head><head><body><script language = "javascript">var currentDate = new Date();document.write("<table border=1 cellpadding=3 cellspacing=0>");document.write("<tr>");document.write("<td colspan=7 align='cen ...
var thisDate = new Date();document.writeln(thisDate.toString());用于显示当前的时间 if ((thisDate.getDate() >= 1 && thisDate.getDate() <=6) && (thisDate.getHours() >= 9 && thisDate.getHours()<= 15))用这样的语句可以使网页在一定的时间里做出if语句里的动作 thisDate.getDay()得到当前是星期几. var Surl = documen ...
sa.js文件 document.write("good day"); ex1.html文件 <html><head></head><body><pre><script language = "javaScript">//this is commentdocument.writeln("hello");var value1 = '100';var value2 = "kill you";var value3 = 342;var value4 ...
在javaSript的注释中的语句只有在支持javaScript的浏览器上才能显现 不支持的浏览器要使用<noscript></noscript> 一旦使用<script language = "javaScript" src = "sa.js">语句块</script>则语句块不能再被使用.调用的 ...
//LRU algorithm//author:chillyCreator//in the page_information, the bigger number means the newer page.//if the number in the page_information is -1, it means no page is in this position. #include<iostream>using namespace std; bool isNotIn(int p_page_num);bool isNotFull(int& position);void ...
#include<iostream>usingnamespacestd;int**allocate,*total,**need,*require;intnum_process,num_resource;boolisDeadLock(intc=0);boolfindFinish();
Global site tag (gtag.js) - Google Analytics