package com.An;public class MAin
{ float n,k;
static float l,m;
public MAin()
{
System.out.println("无参构造");}
{//初始块
k=5;
System.out.println("初始块"+k);}
static
{
m=4;
System.out.println("静态初始块"+m);}
public MAin(float newN)
{
n=newN;
System.out.println("有参构造"+n);}
public static void JIN(){
ystem.out.println("静 态"+l);}}
public class MAin1 {
/** * @param args */
public static void main(String[] args) {
// TODO Auto-generated method stub
//类名 对象名
MAin pun=new MAin();
MAin n=new MAin(5.0f);
n.l=10;
MAin.JIN();
MAin2 M=new MAin2();
M.setM(5.0f);
System.out.println("分装调用"+M.getM());
}}