首页 > TAG信息列表 > perosn

回顾方法及加深

回顾方法及加深 package zaiyang.oop.demo01; public class Demo02 { public static void main(String[] args) { //实例化这个类 new //对象类型 对象名 = 对象值; Student student = new Student(); student.say(); } //和类一起

java 方法的传递

1、创建一个Student类 ,进行调用 package oop; //学生类; public class Student { //定义一个方法 // 非静态方法 public void say(){ System.out.println("同学们开始说话!!!"); } } 1、创建Demo02 类 package oop; /* 方法的调用; */ public class Demo02 {

java的值传递和引用传递问题

在网上学了值传递和引用传递 //值传递 public class Demo02 { public static void main(String[] args) { String a = "1"; System.out.println(a); Demo02.change(a); System.out.println(a); } public static void change(String a){

面向对象03回顾方法的调用

package com.oop.demo01;public class Demo02 { public static void main(String[] args) { //实例化这个类 new //对象类型 对象名 = 对象值; Student student = new Student(); student.say(); } //和类一起加载的 public void a(){