Register FAQ Calendar Search Today's Posts Mark Forums Read

Go Back   Java Programming Forums > Java Programming > New to Java

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 22-10-2008, 11:48 AM
Junior Member
 
Join Date: Oct 2008
Location: bangladesh
Posts: 6
shawon barua is on a distinguished road
Question want help

I am a new java programmer.so i need help from you about the process that i can do better in java programming.Actually you have to show me the way.
Reply With Quote
  #2 (permalink)  
Old 22-10-2008, 03:12 PM
JavaPF's Avatar
Java Programmer
 
Join Date: May 2008
Location: Deep inside the Eclipse IDE
Posts: 172
JavaPF will become famous soon enoughJavaPF will become famous soon enough
Default Re: want help

Hello shawon,

Welcome to the Java Programming Forums.

Java is very complex. Its going to take dedication and lots of reading/practise to learn.

The best place to start is at the Sun Java Tutorials. Its exactly where I started..

The Java™ Tutorials

Read all about the basics. Try to write your first "hello world" program and post back here when you get stuck.

Enjoy.
Reply With Quote
  #3 (permalink)  
Old 22-10-2008, 07:09 PM
Junior Member
 
Join Date: Oct 2008
Location: bangladesh
Posts: 6
shawon barua is on a distinguished road
Thumbs down Re: thanks

Thanks .I am succesful to run first program.But for academic study it is important for me to know about static & it's use,restriction.Actually u have to give me idea with a code.wish ur reply soon.
Reply With Quote
  #4 (permalink)  
Old 23-10-2008, 09:22 AM
JavaPF's Avatar
Java Programmer
 
Join Date: May 2008
Location: Deep inside the Eclipse IDE
Posts: 172
JavaPF will become famous soon enoughJavaPF will become famous soon enough
Default Re: want help

Quote:
The static keyword denotes that a member variable, or method, can be accessed without requiring an instantiation of the class to which it belongs.
In simple terms, it means that you can call a method, even if you've never created the object to which it belongs! Every time you run a stand-alone application (which requires a static main method), the virtual machine can call the main method without creating a new application object. Of course, unless the application's methods are all static, you will need to create an instance of it at some point.
With regard to member variables, it means that they can be read from, and written to, without creating an object. You may have noticed that many classes create constants that can be read, without creating an object.
Java Code:
static final int VERSION = 2;
Quote:
Static member variables are shared by all instances of the class to which they belong. When writing classes, this can be a handy feature. Consider the following example, where a counter is used to track how many myObject instantiations have taken place.
Java Code:
public class myObject
{
	static int objectCount = 0;

	public myObject()
	{
		objectCount++;
	}

	public String toString()
	{
		return new String ("There are " + objectCount + " objects");
	}
}
Quote:
As each new myObject is created, the counter increments. If you were writing an Internet server application, you could track how many concurrent connections existed (remembering that you'd have to include in the destructor or at the end of the connection code a decrement to your count). When used correctly, static member variables and methods can be quite useful!
Being new to Java your probably finding this quite hard to understand. There is lots and lots of information out there. Id suggest looking through Google because you will find a lot of indepth explanations that will save us both time. Read as much as you can, try different examples until you truely understand what static means.

It all comes together quite nicely once you start writing your own code..

There are some free SCJP ebooks on this site that will be really worth reading and will help you alot in your study.

Free SCJP e-books and mock exam questions
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Custom Search
100 most searched terms
Search Cloud
"bad endpoint type" com.sun.xml.internal.messaging.saaj.soapexceptionimpl com.sun.xml.internal.messaging.saaj.soapexceptionimpl: bad endpoint type com.sun.xml.internal.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception com.sun.xml.internal.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl: message send failed com.sun.xml.internal.messaging.saaj.soapexceptionimpl: message send failed com.sun.xml.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception com.sun.xml.messaging.saaj.soapexceptionimpl: java.security.privilegedactionexception: com.sun.xml.messaging.saaj.soapexceptionimpl: message send failed convert arraylist to map date_format_now eclipse shortcut keys ejb3 quartz java convert double to binary java forum java forums java jtextarea bold java jtextarea color java jtextarea font java jtextarea font size java programmer forum java programmers forum java programming forum java programming forums java read last line java read last line of file java sendkeys java.security.privilegedactionexception java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl: bad response java.security.privilegedactionexception: com.sun.xml.internal.messaging.saaj.soapexceptionimpl: message send failed java.security.privilegedactionexception: com.sun.xml.messaging.saaj.soapexceptionimpl: message send failed javapf javaprogrammingforums jtextarea bold jtextarea font jtextarea font color jtextarea font size programing forums programming forums reset jcombobox saaj0008 saaj0008: bad response; bad request saaj0008: bad response; not found severe: saaj0008 severe: saaj0008: bad response; bad request severe: saaj0008: bad response; not found soap java.security.privilegedactionexception soapexceptionimpl: bad endpoint type textpad java

All times are GMT. The time now is 12:28 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.