Quizack provides you with the best and latest android game development MCQ collection and makes you an expert in this skill. You can be a good android game developer if you study and practice such MCQs from our platform which is free for all.
Which of the following methods is used to display text on screen in eclipse?
public void displayString(String text, int x, int y){
Canvas canvas;
for (int i = 0; i < text.length(); i++) {
Character Ch = text.CharAt(i);
if (glyphs.get(ch) != null) {
canvas.drawBitmap(glyphs.get(ch), x + i, (y* width), null); } } }
displayString(Canvas canvas, String text) {
int x;
int y;
for (intx= 0; x < text.length(); x++) {
Character ch
if (glyphs.get(ch) != null) {
canvas.drawBitmap(glyphs.x+ (i* width.y, null); } } }
public void displayString(Canvas canvas, String text, int x, int y){
for (int i = 0; i < text.length(); i++) {
Character Ch = text.CharAt(i);
if (glyphs.get(ch) != null) {
canvas.drawBitmap(glyphs.get(ch), x + (i * width), y, null); } } }
public void displayString(Canvas canvas, String text, int x){
for (int y = 0; y < text.length(); y++) {
Character ch
if (glyphs.get(ch) != null) {
canvas.drawBitmap(glyphs.get(ch), x * width), null); } } }
Answer:
public void displayString(Canvas canvas, String text, int x, int y){
for (int i = 0; i < text.length(); i++) {
Character Ch = text.CharAt(i);
if (glyphs.get(ch) != null) {
canvas.drawBitmap(glyphs.get(ch), x + (i * width), y, null); } } }