hello,world! 创建文档 创建文档将后缀名改为.java 编写代码 public class helloworld{ public static void main(String[] args){ System.out.print("hello,world!"); }} 进入DOS命令窗口 ...
分类:
其他好文 时间:
2021-02-26 13:21:47
阅读次数:
0
运算符细节 public class Demo1 { public static void main(String[] args) { int a = 10; int b = 20; System.out.println(""+a+b);//输出的是1020 System.out.println(a ...
分类:
编程语言 时间:
2021-02-26 13:17:42
阅读次数:
0
C语言检索内存情况 内存分配的方式 内存分配方式: 从静态存储区域分配。内存在程序编译的时候就已经分配好,这块内存在程序的整个运行期间都存在。例如全局变量,static变量。 在栈上创建。在执行函数时,函数内局部变量的存储单元都可以在栈上创建,函数执行结束时这些存储单元自动被释放。栈内存分配运算内置 ...
分类:
编程语言 时间:
2021-02-25 12:19:25
阅读次数:
0
其实我们可以使用匿名内部类来完成之前的那些操作: 1 package com.hw.second0224; 2 public class MyRunnableTest { 3 public static void main(String[] args) { 4 Runnable r = new Ru ...
分类:
其他好文 时间:
2021-02-25 12:16:42
阅读次数:
0
String 切割成 List<String> 后,再进行其中元素的移除操作的正确姿势: (1) 按需求 进行切割; (2) 切割所得数组,转成 List 集合; (3) 用将原来的集合的数据,复制一遍到新集合中; (4) 操作 新集合,进行移除。 1 public static void main ...
分类:
其他好文 时间:
2021-02-25 12:10:38
阅读次数:
0
我们来看看线程的join方法: 如果,没有join,代码如下,那么其运行效果如下: 1 package com.hw.thread0223; 2 3 public class ThreadDemo2 { 4 public static void main(String[] args) { 5 MyT ...
分类:
编程语言 时间:
2021-02-25 12:03:38
阅读次数:
0
在项目文件中增加 <PropertyGroup Label="Globals"> <!-- .... --> <VcpkgTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgTriplet> <VcpkgTriple ...
分类:
其他好文 时间:
2021-02-25 11:50:41
阅读次数:
0
public static void main(String[] args) { LinkedList<Integer> integers = new LinkedList<>(); integers.add(1); integers.add(8); integers.add(1,3); for ( ...
分类:
编程语言 时间:
2021-02-24 13:21:22
阅读次数:
0
using System; namespace leecode1 { class Program { static void Main(string[] args) { string outString= string.Empty; string s1 = "abc"; string s2 = "p ...
分类:
其他好文 时间:
2021-02-24 12:48:10
阅读次数:
0
创建型-单例模式 class SingletonOne { private static $singletonOne = null; public function ok() { echo 'ok'; } public static function getInstance(){ if (self: ...
分类:
Web程序 时间:
2021-02-23 14:14:02
阅读次数:
0