String appName = context.getString(R.string.app_name);
String welcomeMessage = context.getString(R.string.welcome, userName);This example retrieves a string resource that contains a placeholder for the user's name, and replaces it with the actual value of the "userName" variable. These examples are commonly used in Android applications, and the Context class is part of the Android framework library.