摘要: 接口(interface)定义:抽象方法和常量值的集合。本质上讲,接口是一种特殊的抽象类 ps:1.接口中定义的属性必须是public static final 的,定义的方法必须是public abstract的,因此这些 修饰符可以部分或全部省略 2.接口中定义的属性的值在实现类中不能被更改 3 阅读全文
posted @ 2020-02-02 22:26 溪风吹雨 阅读(175) 评论(0) 推荐(0)
摘要: class Person { int age; } public class LearnHeap { public static void main(String args[]){ int a=18; Person person = new Person(); person.age =18; cha 阅读全文
posted @ 2020-01-28 14:35 溪风吹雨 阅读(131) 评论(0) 推荐(0)
摘要: 1点击“高级”,再点击“工具配置” 2点击“插入”,在“菜单项”名称上输入“编译java程序”,在“命令行”里输入“javac %n%e”,在工作目录上填“%p”。 3切换到“输出”项,选择“输出到列表框”和“捕获输出”,点击“应用”。 4同样,也可以定义运行java程序的工具,点击“插入”,在“菜 阅读全文
posted @ 2020-01-14 20:39 溪风吹雨 阅读(880) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 3 void InvertStore(char A[]) 4 //字符串逆序存储的递归算法。 5 { 6 char ch; 7 static int i = 0;//需要使用静态变量 8 ch=getchar(); 9 if (ch!= '\n') // 阅读全文
posted @ 2020-01-06 20:44 溪风吹雨 阅读(221) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { int num[100]={0}; char ch;int i,k=100; while((ch=getchar()) !='#') { // ↑ ↑两个括号很重要 //!=的优先级大于= //所以你如果不加上括号的话while(ch=g 阅读全文
posted @ 2020-01-06 16:12 溪风吹雨 阅读(210) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<string.h> int main() { char a[100],b[100]; int x[100]={0},y[100]={0},c[100]; gets(a);gets(b); int len1,len2,len=1,flag=0,i, 阅读全文
posted @ 2020-01-05 12:47 溪风吹雨 阅读(167) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<string.h> int main() { int i,j=0,n,k,a[20][20],num=1;scanf("%d",&n); for(k=0;k<n/2;k++) { for(i=k;i<n-1-k;i++) a[i][k]=num+ 阅读全文
posted @ 2020-01-05 12:45 溪风吹雨 阅读(254) 评论(0) 推荐(0)