-
در مورد Thread در جاوا
یکشنبه 29 مردادماه سال 1391 12:16
java supports thread based multitasking. Multitasking using threads: once a program goes for execution it is the job of processor to execute the program. if the program contains some statements that is eligible to transfer the data at that time process goes for "idle" state. to make our process com out from...
-
مقایسه java.awt و javax.swing
یکشنبه 29 مردادماه سال 1391 11:36
java.awt and java.swing contain all of the classes for creating user interfaces. The methods of java.awt package are native methods. They are inherited from C or C++ package. C in platform dependent. the components created by these methods are also dependent on a platform. Example: the button in Windows OS in not same...
-
مقایسه JdbcOdbcDriver و Oracle thin Driver در جاوا
یکشنبه 29 مردادماه سال 1391 02:44
معمولاً برای ارتباط با دیتابیس یا JDBCODBCBridDriver استفاده می شود و یا Oracle Thin Driver در صورتی که از JdbcOdbcDriver استفاده شود، نام کلاسی که برای رجیستر کردن درایور استفاده می شود sun.jdbc.odbc.jdbcodbcDriver است و URL ای هم که در متد getConnection استفاده می شود jdbc:odbc:mydsn است. در صورتی که از Oracle thin...
-
توضیح در مورد مراحل برقراری ارتباط با دیتابیس در جاوا
یکشنبه 29 مردادماه سال 1391 01:52
1- Step1 : before making a connection we need to register the driver. we can achieve it using 2 different methods: 1-register driver methods 2-forname method. registerDriver method belongs to DriverManager class. and it is a static method which gets the argument as object of driver class....
-
در مورد Java.SQL -برقراری ارتباط با دیتابیس در جاوا
شنبه 28 مردادماه سال 1391 23:51
Java is good in processing data and database is good in storing data. Java understands only Java programming language and database knows only structure body language. Java API supports SQL package using which we can made a connection among the java programming language and the database. For making a connection we have...
-
در مورد Java.IO
شنبه 28 مردادماه سال 1391 23:17
The data transfer occurs in the format of streams in java. we can transfer the data in and out. The constructor of System class is defined as private; we can not create object of system class. In System class there are 3 static variables 1-in 2-out 3-error in: is the object of InputStream class. out: is the object of...
-
چند نکته در مورد Collection- map در جاوا
شنبه 28 مردادماه سال 1391 22:40
map stores the data (key, value) pair map does not support duplicate key key can not but value can be duplicate map hs two implemented clases 1-hash map 2-hash table hash map: this store the element in (key, value) pair and allows null values hash map is not synchronized by default Hash table: this doesn't allow any...
-
چند نکته در مورد Stack در جاوا
شنبه 28 مردادماه سال 1391 22:31
Stack is another class of list interface that does all the operations on the top of the collection. stack supports LIFO operation. last in first operation. stack support some methods to do this operations. those are: 1-push: adds the element to the top of the stack. 2-pop: deletes the the top most element from the...
-
List در جاوا
سهشنبه 17 مردادماه سال 1391 02:04
List is another interface present in java API for collection. list has of 4 different implemented classes {Array list, link list; stack and vector} list supports the duplicate values and stores the data in the same manner how we had provided. Array list support all feature of list. but store the data in Array format....
-
Itrator Interface در جاوا
سهشنبه 17 مردادماه سال 1391 01:48
Itrator is an interface that retrieve the data one after an other. Itrator supports some methods. hs.next() this method return true if the next element is present in the collection else return false. next() method return the next element from the collection. we have to create the object of itrator interface using the...
-
Collection در جاوا
سهشنبه 17 مردادماه سال 1391 01:41
to store n number of data we can use arrays. but there are some problem in array: 1-array is a fixed length 2-type is defined and fixed and we can not store different data types. 3-the operations like insertion and deletion are very difficult. java provides Collection interface. Collection is an interface in java.util...
-
Exception class در جاوا
سهشنبه 17 مردادماه سال 1391 00:59
the Exception class is divided to 2 types: 1-checked 2-unchecked exception checked exceptions are the exception objects for which my compiler can rise them and handle them. unchecked: the compiler will not rise any complaint if we did not check. unchecked is subclass of the run time exception.
-
چند نکته در مورد Exception Handling در جاوا
سهشنبه 17 مردادماه سال 1391 00:19
error has 2 types: compile time error and run time error or syntax error and logical error. in logical error once the control face the error statement it creates the object of corresponding exception class. once exception object created the object passes to calling place of the method. once the object reject at JVM,...
-
تعیین سطح دسترسی در جاوا
دوشنبه 16 مردادماه سال 1391 23:45
Access specified specified the accessibility of the members. access specified can be used before a method, constructor, variable, constant, class and other structures. java can support 4 types of access specifides: 1-public 2-private 3-protected 4-default the public describes the accessibility as global. that means...
-
package در جاوا
دوشنبه 16 مردادماه سال 1391 21:59
package is same as a folder that contains the related .class file. to create a package the keyword "package" is used. the classes in the package should be declared as a public. if you want to use this classes in another class outside the package then you have to import to that class using import keyword....
-
تفاوت بین Abstract class و اینترفیس در جاوا
دوشنبه 16 مردادماه سال 1391 21:37
تفاوت interface و Abstract class در جاوا به شرح زیر می باشد: Abstract Class Interface contains zero or more abstract methods interface contains all abstract methods Abstract class can contain variable interface contains only constant Abstract class contains constructor interface does not have any constructor extend...
-
چند نکته در مورد Abstract class در جاوا
دوشنبه 16 مردادماه سال 1391 21:02
Abstract class contains zero or more abstract methods. the class that want to provide the definition of the abstract method present in abstract class, has to extend the abstract class. the abstract keyword can be used only before a method and before a class. we can create reference variable of the abstract class but...
-
چند نکته در مورد اینترفیس در جاوا
دوشنبه 16 مردادماه سال 1391 20:50
directly JVM knows that the method of the interface is abstract and it is no need to write abstract before the method in the interface. we can create reference variable of an interface, but we can not create the object of an interface using a new keyword. interface can not contain constant. They are "static...
-
اینترفیس و Abstract در جاوا
یکشنبه 15 مردادماه سال 1391 21:38
new keyword is not applicable before interface Abstract methods are methods without body Abstract method contains only signature(return type, name of the method and arguments) example: abstract public void meth(int x , int y); Interface is a fully unimplemented structure supported by java. Interface contains all...
-
class، Interface و abstract class در جاوا
یکشنبه 15 مردادماه سال 1391 20:33
java supports 3 types of structures as follows: fully implemented that is class fully unimplemented that is interface partly implemented and unimplemented that is Abstract class
-
early binding و late binding در جاوا
یکشنبه 15 مردادماه سال 1391 20:24
early binding و late binding در جاوا به ترتیب معادل static Polymorphism و dynamic polymorphism هستند.
-
کلمه کلیدی final در جاوا
یکشنبه 15 مردادماه سال 1391 20:20
final is another keyword can be used in 3 different ways: 1-before a variable, 2-before a method, 3-before a class if it is used before a variable, no one can modify it. that variable changes to a constant. eample; final int x = 100; if it is used before a method no one can override the method. overloading is possible...
-
دستور پیش فرض در Constructor کلاس در جاوا
یکشنبه 15 مردادماه سال 1391 20:13
super keyword is a default statement inside a constructor, this keyword must be the first statement inside the constructor and can not be second or .. If we are not writing any statement inside the constructor, java compiler will add the default statement to the constructor.
-
تفاوت Method Overloading و Method Overriding در جاوا
یکشنبه 15 مردادماه سال 1391 19:58
method overloading is creating more than one method with same name but different signature. It is used to achieve static poly morphisim. method overriding is writing more than one method with same name and same signature in super class and sub class to acheive dynamic polymorophisim.
-
تفاوت this و super در جاوا
یکشنبه 15 مردادماه سال 1391 19:53
super points to the immediate Super class Object whereas this keyword points to the same object.
-
کلمه کلیدی this در جاوا
یکشنبه 15 مردادماه سال 1391 19:51
this keyword is another keyword in java language used to point same class object explicitly. this keyword can not used in static block or static method.
-
Dynamic Polymorphism در جاوا
یکشنبه 15 مردادماه سال 1391 19:10
what is dynamic or run time polymorphism in java? if the method execution is depend on JVM it is named Dynamic Polymorphism. Dynamic poly morphism can be achieved using method overriding. writting more than one method with same name and same signature in super class and sub class is known as method overriding
-
کلمه کلیدی super در جاوا
یکشنبه 15 مردادماه سال 1391 18:51
super is a keyword which is reserved in java language to point to the immediate super class object. super keyword can not be used from static block or static methods. super.super is wrong. we can not use like this
-
چرا جاوا Multiple Inheritance را Support نمی کند؟
یکشنبه 15 مردادماه سال 1391 18:44
java dose not support multiple inheritance. why? let if java suppot multple inheritance,suppose i have a class A with method meth(), class B and C are inherited from class A. now method meth() is available to class B and C. using multiple inheritance if inherit B and C class to class D my JVM will go to an ambiguity....
-
نکاتی در مورد Inheritance در جاوا
یکشنبه 15 مردادماه سال 1391 14:33
Inheritance is known as getting property of one class to another. in java we can achieve inheritance using the keyword extends. inheritance has 3 types 1-single inheritance 2-multiple inheritance and 3-circular inheritance. no programming language support circular inheritance. Java also doesn't support multiple...