In this video it demonstrates that how one can check the ‘System.out.println’ in logcat window of the Android Studio IDE.
It also shows how to filter the ‘System.out.println’ statements in the logcat with the System.out tag.
I hope you like this video. For any questions, suggestions or appreciation please contact us at: https://programmerworld.co/contact/ or email at: programmerworld1990@gmail.com
Code:
package com.programmerworld.systemprintlnoutput;
import android.os.Bundle;
import android.view.View;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_main);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
System.out.println("Android Application loaded ");
return insets;
});
}
public void buttonSystemPrintLn(View view){
System.out.println("Button on click method started ... ");
// TODOs
System.out.println("... Button on click method completed!");
}
}
Screenshots: