UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Can we print any string in Java without a semicolon?

Asked by Last Modified  

6 Answers

Learn Java

Follow 2
Answer

Please enter your answer

Trainer

Yes We can print a string with out semicolon in if statement. public class Print_Without_Semicolon { public static void main(String args) { int i = 0; if(System.out.printf("print without if") == null) {} for(i = 1; i < 2; System.out.println(" ::print without if second::")) ...
read more
Yes We can print a string with out semicolon in if statement. public class Print_Without_Semicolon { public static void main(String[] args) { int i = 0; if(System.out.printf("print without if") == null) {} for(i = 1; i < 2; System.out.println(" ::print without if second::")) { i++; } } } read less
Comments

Training Centre

Semicolon is mandatory in Java. Only if it is a block(if, for loop, while etc..) you will use Flower braces.
Comments

Training Centre

To refer a Global variable both Static and Nonstatic
Comments

Training Centre

1. Throws clause is used to declare an exception and throw keyword is used to throw an exception explicitly. 2. If we see syntax wise, throw is followed by an instance variable and throws is followed by exception class names. 3. Throw keyword is used inside method body to invoke an exception and throws...
read more
1. Throws clause is used to declare an exception and throw keyword is used to throw an exception explicitly. 2. If we see syntax wise, throw is followed by an instance variable and throws is followed by exception class names. 3. Throw keyword is used inside method body to invoke an exception and throws clause is used in method declaration ( ). 4. Throw keyword should be the last line in the method. 5. Throw keyword is used to throw an exception explicitly. Only object of Throwable class or its subclasses can be thrown. Program execution stops on encountering throw Example Eg-1 throw new Exception("You have some exception") throw new IOException("Connection failed!!") throws Example Eg-1 throws IOException, ArithmeticException, NullPointerException read less
Comments

Java Trainer

yes we can if(System.out.printf("hello")) { }
Comments

Trainer

The this keyword can be used to refer to any member of the current object from in an instance Method or a constructor. this can be used to invoke current class method (implicitly). this can be passed as argument in the constructor call. this() used to involve current class constructor.
Comments

View 4 more Answers

Related Questions

What is JavaBean?
All javabeans are pojos ,But not all pojos are not javabeans.
Ankit
0 0
6
I want to Learn java. How do I start?
Start with Complete Reference book.
A
Can anyone know if there are tools/apps for representing the objects/classes/methods in the JVM in pictorial way?
rational rose and ibm software architect can be used for design and representation
Raghavendra Reddy
0 0
7
Who invented Java language?
James Gosling. You could have google it!!
Niranjan
What is difference between C language and Java language?
C is more procedure-oriented while JAVA is data-oriented. Java is an Interpreted language while C is a compiled language. C uses the top-down {sharp & smooth} approach while JAVA uses the bottom-up...
Poonam
0 0
5

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Introduction to Course Content
Video about what we are going to learn throughout the Java Training Session .

Why we need to learn Programming languages?
Language is medium for communication. If two parties like to communicate or exchange the thoughts they must know a language. Language should be understandable by both the Parties. For example A wants to...

Importance of Constructor's Visibility.
While developing program or implementing Singleton pattern we have learnt to mention constructor as private and known reason is -> to blocked its direct call from outside of class. But did we think...
M

Example of DependsOnMethod in TestNG
public class dependsonM { @Test public void login() { System.out.println("login"); } @Test (dependsOnMethods = {"login"}) public void email() { //Intentionally I am failing this testcase Assert.assertTrue(false);...
S

Sarthak C.

0 0
0

Java Interview Questions & Answers
Java Interview Questions have been designed especially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Java Programming Language. As per my...

Recommended Articles

In the domain of Information Technology, there is always a lot to learn and implement. However, some technologies have a relatively higher demand than the rest of the others. So here are some popular IT courses for the present and upcoming future: Cloud Computing Cloud Computing is a computing technique which is used...

Read full article >

Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”.  Right from its first implication as java 1.0...

Read full article >

Designed in a flexible and user-friendly demeanor, Java is the most commonly used programming language for the creation of web applications and platform. It allows developers to “write once, run anywhere” (WORA). It is general-purpose, a high-level programming language developed by Sun Microsystem. Initially known as an...

Read full article >

Before we start on the importance of learning JavaScript, let’s start with a short introduction on the topic. JavaScript is the most popular programming language in the world, precisely it is the language - for Computers, the Web, Servers, Smart Phone, Laptops, Mobiles, Tablets and more. And if you are a beginner or planning...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more