学习Java11

EASY CODE:
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class Day {

	public static void main(String[] args){
		Day day=new Day();
		day.go();
	}
	public void go(){
	JFrame frame=new JFrame();
	JPanel panel=new JPanel();
	panel.setBackground(Color.darkGray);
	
	panel.setLayout(new BoxLayout(panel,BoxLayout.Y_AXIS));
	
	JButton button=new JButton("shock me");
	JButton buttontwo=new JButton("bliss");
	
	panel.add(button);
	panel.add(buttontwo);
	
	frame.getContentPane().add(BorderLayout.EAST,panel);
	frame.setSize(250,200);
	frame.setVisible(true);
	
	}
}
Acrackme:
import java.io.BufferedReader;  
import java.io.InputStreamReader;  
public class Day
{  
    public Day()  
    {  
    
    }  
     public static void main(String [] arguments)throws Exception   
    {  Day d= new Day();
	   boolean flag=true;
	   System.out.println("********************Welcome to my testDome ver1.0*****************");
	   System.out.println("********************CODE BY pojie_xiaoyu-->1326397****************");
	   System.out.println("**********The program is my first crackme,so it is easy!**********");
	   System.out.println("**************************Have Fun!*******************************");
	   do{
	 
        System.out.print("Input the password:");
  		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  		String inputStr = br.readLine();
		if(inputStr.equals("xiaoyu1992")){
		System.out.println("Congratulations!You hava cracked this game!");  
		}else{
		System.out.println("sorry,you failed.please have a try next time!.");  
		}
    }  while (flag);
	  } 

}   

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值