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

 I want to learn from beginning, please tell me what is the best source to learn (core java)

hi sunaini It is very good that you want to learn programming... I would recommend you c,c++,java and dotnet courses...for becoming a good provrammer.. we provide online training..at lowest prices if...
Sunaini
Which is the best programming language to learn in today's era? Java, C,C++, Python or any else?
Java is the best language because it is platform indepedent and opensource u can download java software at anywhere
Swati
0 0
5
Why Operator Overloading in not allowed in JAVA?
Java does not support operator overloading by programmers. This is not the same as stating that Java does not need operator overloading. Operator overloading is syntactic sugar to express an operation...
Ashish
Can a class have interface and vice-versa?
how its possible both has different meaning you cant enclosed it
Deepa
0 0
7
how to run a java program
go to command prompt then write the following-- For compilation: javac filename.java then press enter For run: java classname then press enter
Prem Kumar Pathak

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

Ask a Question

Related Lessons

What Is Applet & Its Life Cycle?
What is Applet & its life cycle?Applet is a Java programme that can be embedded into HTML page.Java Applet runs on the java enables web browsers such as Mozilla & Internet Explorer.Applets are...
I

ICreative Solution

0 0
0

Class and Objects in Java
Class is a template or a blueprint which is used to describe an object. On other hand Object is a reference of a class which follows all the stuff written inside the class. How about taking the whole tour in the following video

Difference Of Inheritance In C++ And Java
In Java , multiple inheritance is not applicable directly but we can implement the concept by using the interfaces. In c++ and Java, the common types of inheritances are: Single Multi level Hybrid Hierarchical

Java and C trainer
Always think any conspect with real-time example like Object -- object must have states and behaviour then only we will call that thing is Object like fan is Object (rotating,color)

Why Should We Learn Java Language?
Most of starters has confusion today that which of the programming language should be chosen to work on. It totally depends upon your need. As per my opinion, if you want to grow your career in IT industry...

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