6.5

所花时间(包括上课):1

打码量(行):90

博客量(篇):1

了解到知识点:学习debug调试

 

 package com.example.myapp;

 

import android.os.Bundle;

import android.util.Log;

 

import androidx.appcompat.app.AppCompatActivity;

 

public class MainActivity extends AppCompatActivity {

 

    private static final String TAG = "MainActivity";

 

    @Override

    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);

 

        // 示例代码

        int result = calculateSum(5, 10);

        Log.d(TAG, "Result: " + result);

    }

 

    private int calculateSum(int a, int b) {

        // 在这里设置断点

        int sum = a + b;

        return sum;

    }

}

posted @ 2024-06-05 22:51  赵千万  阅读(2)  评论(0编辑  收藏  举报