java变量
public class test{
… …
public void aMethod(int j){
int m,n,k;
String a = “aaaa”,b = “bbbb”;
m = j;
k = 100;
System.out.println(m);
System.out.println(n);//Error
System.out.println(k);
}
}
public class test
{
int i = 10,p=20;
float f,j;
f = 100.0f
String s1,s2;
… …
}
public class TestScope
{
public static void main(String[] args)
{
int x = 12;
{
int q = 96; // x和q都可用
int x = 3;//错误的定义,Java中不允许有这种嵌套定义
System.out.println("x is "+x);
System.out.println("q is "+q);
}
q = x; /* 错误的行,只有x可用, q 超出了作用域范围 */
System.out.println("x is "+x);
}
}
服务范围:定制各类计算机程序设计,vue、jsp、java 各类框架;开发工具 eclipse / myeclipse / idea / vs 等;wap、android、ssm、springboot、asp.net、php、python(爬虫、django、flask)、node.js、react、winform、uniapp 小程序等。
