473,491 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

a very basic doubt in java

1 New Member
Can i put a condition saying that "if a variable carries a srting content" like this way(im a very beginner to java )

if(couple!=null)
{
do this.....
}

(couple is my variable)
Sep 26 '07 #1
2 1076
JosAH
11,448 Recognized Expert MVP
Can i put a condition saying that "if a variable carries a srting content" like this way(im a very beginner to java )

if(couple!=null)
{
do this.....
}

(couple is my variable)
Sure you can; if 'couple' is a non-primitive variable you can surely do that; in fact
it's quite normal idiom.

kind regards,

Jos
Sep 26 '07 #2
r035198x
13,262 MVP
Can i put a condition saying that "if a variable carries a srting content" like this way(im a very beginner to java )

if(couple!=null)
{
do this.....
}

(couple is my variable)
Do not post questions in the articles section.
Why don't you try it on the compiler and see what happens? The best way to learn these things is to read the appropriate tutorial and to try as much code on the compiler as possible.
Sep 26 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3482
by: Mark R Rivet | last post by:
I've installed JDK1.1.5 on my windows 2000 professional system and when I give it the command ( in a command prompt window) to compile, it does, but when I try to run the program I get this...
5
5701
by: Lee David | last post by:
I went to the sun site and downloaded what I hope is the development part of java. I downloaded JDK5 with Netbeans. I installed it and now have a folder in my program group "Netbeans". Is that...
14
2482
by: luis | last post by:
Are basic types (int, long, ...) objetcs or not? I read that in C# all are objects including basic types, derived from Object class. Then in msdn documentation says that boxing converts basic...
1
1059
by: Markus Stehle | last post by:
Hi all! We are planning to provide .net web services to our partners. As I am new to web services technology, I have some questions concerning data exchange and interop. As most of our...
28
2417
by: grappletech | last post by:
I took Pascal and BASIC in a couple of beginner programming courses about a decade ago and did well with them. I am good with pseudocode, algorithms, and the mathematics of programming. I decided...
6
1359
by: John Bailo | last post by:
http://www.informationweek.com/software/showArticle.jhtml?articleID=196600515 Developers Embrace Java, Drop Visual Basic "Developers have abandoned Microsoft's Visual Basic in droves during...
6
3129
by: Simon Walsh | last post by:
I'm an Electronics student in college and I'm currently working on a project. I was given a circuit diagram for my project, from which I had to design a printed circuit board to be sent off and...
14
1825
by: MartinRinehart | last post by:
Working on parser for my language, I see that all classes (Token, Production, Statement, ...) have one thing in common. They all maintain start and stop positions in the source text. So it seems...
3
2019
by: sukatoa | last post by:
Good day Is it safe to use java regex to extract links and email addresses of a specific webpage?(this is not intended for malicious activity) We are on the final stage in college, and we have...
0
6978
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5451
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4881
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1392
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
280
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.