"హాయ్, ఇది మళ్లీ నేనే. ఈ రోజు నేను మీకు మూడు పాఠాలు ఇస్తాను. మరియు ఇది రెండవది! మిమ్మల్ని మీరు హాయిగా చేసుకోండి మరియు వినండి. స్క్రీన్‌పై వచనాన్ని ప్రదర్శించడం గురించి నేను మీకు చెప్పబోతున్నాను. నిజానికి ఇది చాలా సులభం:"

జావా కోడ్ స్క్రీన్‌పై ఏమి ప్రదర్శించబడుతుంది
System.out.println("Diego");
System.out.println(3);
System.out.println("Rain" + "In" + "Spain");
Diego
3
RainInSpain
System.out.println(1 + 3);
System.out.println("1" + "3");
System.out.println(1 + "3");
System.out.println("1" + 3);
System.out.println("1" + (1 + 3));
4
13
13
13
14
System.out.println("Amigo is the best!");
System.out.println("Amigo" + "is the best!");
System.out.println("Amigo" + " " + "is the best!");
Amigo is the best!
Amigois the best!
Amigo is the best!
System.out.println(3 * 3 + 4 * 4);
System.out.println(1 * 2 + 3 * 4);
25
14
System.out.print("Diego");
System.out.print("Diego");
System.out.print("Diego");
DiegoDiegoDiego
System.out.print("Diego ");
System.out.println("is the best!");
System.out.print("Amigo ");
System.out.println("is the best!");
Diego is the best!
Amigo is the best!

" ప్రింట్() మరియు println() గురించి మరొకసారి చెప్పగలరా ?"

" ప్రింట్() , ఫంక్షన్ స్క్రీన్‌పై టెక్స్ట్‌ని, క్యారెక్టర్ ద్వారా క్యారెక్టర్‌ని ప్రదర్శించడానికి ఉపయోగించబడుతుంది. స్క్రీన్‌కి ఇకపై లైన్‌లో స్థలం లేనప్పుడు, టెక్స్ట్ తదుపరి లైన్‌లో ప్రదర్శించబడటం ప్రారంభమవుతుంది. మీరు println() ఫంక్షన్‌ని ఉపయోగించవచ్చు. ప్రస్తుత పంక్తిలో వచనం నిండకముందే ప్రదర్శించడాన్ని ఆపివేయడానికి. తదుపరి టెక్స్ట్ తదుపరి లైన్‌లో కనిపిస్తుంది."

"సరే. మరియు సంఖ్యలు మరియు స్ట్రింగ్‌లను జోడించడంలో ఆ ట్రిక్ ఏమిటి?"

"మీరు రెండు సంఖ్యలను జోడిస్తే, ఫలితం కూడా ఒక సంఖ్య: 2+2 4కి సమానం. మీరు ఒక సంఖ్య మరియు స్ట్రింగ్‌ని జోడిస్తే, ఆ సంఖ్య స్ట్రింగ్‌గా మార్చబడుతుంది. ఆ తర్వాత రెండు స్ట్రింగ్‌లు కేవలం ఒకదానితో ఒకటి కలిసిపోతాయి."

"ఓహ్! ఉదాహరణలను చూడటం నుండి నేను అదే అనుకున్నాను, కానీ ఎవరికి తెలుసు. ఈ ఆసక్తికరమైన పాఠానికి ధన్యవాదాలు, ఎల్లీ."

"మీకు స్వాగతం. చివరగా, డియెగో నుండి కొన్ని పనులు ఇక్కడ ఉన్నాయి. నేను మీ పురోగతిని తనిఖీ చేయాలని అతను కోరుకున్నాడు."

1
టాస్క్
Java Syntax,  స్థాయిపాఠం
లాక్ చేయబడింది
Finding bugs
If you show me someone who has never once made a programming error, we can say with certainty: you must not be talking about a human. Bug-free programming just doesn't happen. But this isn't so scary. The most important thing is to immediately accept that bugs are inevitable. We search for (or "catch", as professionals sometimes say) and correct bugs.
1
టాస్క్
Java Syntax,  స్థాయిపాఠం
లాక్ చేయబడింది
We don't need any extra lines
Inexperienced and, at times, experienced programmers create superfluous code. Just in case. For example, they may declare a couple dozen variables and then not know what to do with them. In this task, someone did something weird, and we get to correct it. Look for unused variables and convert them to comments in order to hide from the compiler.