Difference between null vector and empty Vector
What is the diffrence between null vector and empty vector.
null vector means the JVM doesn't allocate memory.It doesn't exist
in memory. NO instance!
empty vector means the JVM allocated memory.It exists in memory.
it's a instance than is accessabel.But only have on elements.
GL&HF.
Similar Messages
-
Difference between null string and empty string??
what is the major difference between null string and an empty string??
I wrote the following simple program and I could see some different output.
Other than that, any other differences that we should pay attention to???
C:\>java TestCode
Hello
nullHello
public class TestCode
public static void main(String[] s)
{ String s1 = "";
String s2 = null;
System.out.println(s1 + "Hello");
System.out.println(s2 + "Hello");
}The difference is that an empty String is just empty but a null String has no value (i.e. it is not instantiated) this has signifigance since all Strings are objects.
-
What is difference between Null String and Empty String ?
Hi
Just i have little confusion that the difference bet'n NULL String and Empty String ..
Please clear my doubte.
ThankxFor the same reason I think it's okay to say "null
String" and "empty String "as long as you know they
really mean "null String reference" and "empty String
object" respectively. Crap. It's only okay to say that as long as *the one you're talking to" knows what it really means. Whether you know it or not is absolutely irrelevant. And there is hardly any ambiguity about the effects that a statement like "assign an object to a reference" brings. "Null String" differs in that way. -
What is the difference between String Constant and Empty String Constant
What is the difference between string constant which does not contain any value and the Empty string constant?
While testing a VI which contain a normal string constant in VI analyzer, it gives error to change string constant with the empty string constant?
Please Reply
prabhakant
Regards
Prabhakant PatilReadability.
Functionally, they are the same. From a coding standpoint, the Empty String Constant is unambiguous.
It is empty and will always be; good for initialization. Also, because you can not type a value into and Empty String Constant, someone would need to conciously replace it to set a 'default' value that is something other than NULL.
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.
"You are what you don't automate"
Inplaceness is synonymous with insidiousness -
Difference between null layout and absolutelayout
hello
I would like to know the difference between the null layout and the absolutelayout
thank you in advancehttp://www.google.com/search?q=absolutelayout
Next time, please use the search yourself.Do I have to consider this as answer Yes.
notice that I asked for the difference between both
of the layout and not about
absolutelayout only Third link, advertised by
"I think AbsoluteLayout does more than just setting Layout to null. AbsoluteLayout may even accomodate for changes in font sizes etc. ..."
already should give you something to think about.
Furthermore, the search shows that there are several different classes named AbsoluteLayout (ADF, SWT, BUI, samskivert...), and you didn't specify which one you're talking about.
Still think this wasn't an answer?
I guess I should stop assuming that you have a brain of your own. -
OSB to Object Types: difference between NULL value and not available
Hello all,
I have a question about Object Types. More specifically, how to differentiate between an empty value (null) and a string not available.
This is my case:
I have created an object type with three parameters.
CREATE OR REPLACE TYPE OSB_EMP_OBJ_TYPE AS OBJECT
(EMP_ID NUMBER
,DEPT_ID NUMBER
,ORDER_ID NUMBER
,CONSTRUCTOR FUNCTION OSB_EMP_OBJ_TYPE
RETURN self as result
/I would like to see what happens when I put an empty string into emp_id, NULL into DEPT_ID and nothing into ORDER_ID.
To do so I have this test script:
declare
p_emp OSB_EMP_OBJ_TYPE := OSB_EMP_OBJ_TYPE();
begin
p_emp.EMP_ID := '';
p_emp.DEPT_ID := null;
-- p_emp.ORDER_ID := null;
if p_emp.EMP_ID is null
then
dbms_output.put_line('Empty');
end if;
if p_emp.DEPT_ID is null
then
dbms_output.put_line('NULL');
end if;
if p_emp.ORDER_ID is null
then
dbms_output.put_line('Not available');
end if;
end;The result of this is:
Empty
NULL
Not availableIt seems that Oracle treats all three situations alike. What I would like to achieve is a way to see that p_emp.ORDER_ID was not initialized.
To elaborate a bit: in our production system this procedure would be called from OSB and the object type would by the input for that procedure. Our database version is 10.2.0.5.0.
Our procedures look something like this:
procedure p_procedure ( p_emp in osb_emp_obj_type )
is
begin
do_something;
end;Can anyone tell me if there is a way to achieve this, so I can see whether or not a value in the object type was filled?
Thanks in advance!Darn...
Eventually we want to use this for an update procedure. The client gets all current data from the database by calling a webservice that (using OSB) selects the data from our database. What we want to achieve is that the client can update that data, by returning only the changed fields to an update procedure.
We then handle an empty tag to update the field to null, and we ignore missing tags.
OSB itself can handle this, but PL/SQL can't.
I'm now thinking of adding an indicator to each optional field (clear_field_yn). OSB can still check for empty tags or missing tags. When a tag is empty, it's corresponding indicator will be set to 'Y'. If the tag is missing, then it will be set to 'N'.
Is that a solution to consider, or is there a much simpler approach possible? -
Differnce between null string and an empty string??
what is the major difference between null string and an empty string??
I wrote the following simple program and I could see some different output.
Other than that, any other differences that we should pay attention to???
C:\>java TestCode
Hello
nullHello
public class TestCode
public static void main(String[] s)
{ String s1 = "";
String s2 = null;
System.out.println(s1 + "Hello");
System.out.println(s2 + "Hello");
}There's a big difference between the two. A null String isn't pointing to an object, but an empty String is. For example, this is perfectly fine:
public class TestCode
public static void main(String[] args)
String s = "";
System.out.println(s.length());
} It prints out 0 for the length of the String, just as it should. But this code will give you a NullPointerException:
public class TestCode
public static void main(String[] args)
String s = null;
System.out.println(s.length());
} Since s isn't pointing to anything, you can't call its methods. -
Difference between Null and null?
What is the difference between null and NULL?
When is each used?
Thanks,veryConfused wrote:
There is a null in java, but no NULL. null means no value. However, when assigning value, the following is different:Although the empty String has no special role. Null means, the referential type is not assigned (doesn't refer) to a specific object. The empty String is just another object though, so seeing it or pointing it out as something special when it actually isn't at all (no more special than new Integer(0) or new Object[0]) just adds to the confusion. -
Difference between Null in c and Null in Oracle
Hi,
Can any one tell me the difference between NULL in C language and NULL in Oracle
Rds,
Naga> Null is some garvage value in oracle.
Not sure what you mean.
AFAIK and not being a C programmer myself, isn't null CHR(0) in C? I'm not sure the two concepts (SQL null and C null) have anything in common. -
What is the difference between "= NULL" and "IS NULL" in SQL?
Hi,
I believe there is a difference between "= NULL" and "IS NULL" comparsion, but I couldn't find it. Anyone knows the difference?
Thanks,
DennyAha, thanks:
SQL> create table william_test_tab (col binary_double);
Table created.
SQL> insert into william_test_tab
2 select rownum / (rownum - 1) from user_tables where rownum < 4;
select rownum / (rownum - 1) from user_tables where rownum < 4
ERROR at line 2:
ORA-01476: divisor is equal to zero
SQL> insert into william_test_tab
2 select 1d * rownum / (rownum - 1) from user_tables where rownum < 4;
3 rows created.
SQL> select * from william_test_tab;
COL
Inf
2.0E+000
1.5E+000
3 rows selected.
SQL> select * from william_test_tab where col is infinite;
COL
Inf
1 row selected.
SQL> -
What's difference between JPanel.remove(); and JPanel = null
nice day,
how can remove JPanel (including its JComponents), safe way, can you explain the difference between JPanel.remove () and JPanel = null,
1/ because if JPanel does not contain any static JComponents
2/ or any reference to static objects,
then works as well as JPanel.remove or JPanel = null,
or what and why preferred to avoid some action (to avoid to remove or to avoid to null)mKorbel wrote:
nice day,
how can remove JPanel (including its JComponents), safe way, can you explain the difference between JPanel.remove () and JPanel = null, Remove the JPanel from the container it was part of and make sure you do not keep any references to it from your own classes. Don't make it any more difficult than it has to be. -
Difference between PRIMARY KEY and UNIQUE KEY with NOT NULL
What is the difference between PRIMARY KEY and UNIQUE KEY with NOT NULL constraint?
Message was edited by:
Nilesh HoleAnswer for the master!!!
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:8743855576462
Thanks,
Karthick -
Difference between conn.close() and conn=null;
Hi All,
Can anybody please let me know the difference between conn.close()
and conn=null;
where conn is reference to Connection.
Thanks and Regards
-sunjavadeveloperThanks for your response.
Is there any other good approach to close() & then
null the Obj. can u give us your opinion.
finally
try{
if(dbconn != null) dbconn.close();
if(stmt != null) stmt.close();
if(rs != null) rs.close();
if(con != null) con.close();
catch (Exception e)
logger.fatal(e.getMessage(),e);
throw new Exception ("Exception -- Vendor.java --
a -- authenticate -- " + e.getMessage() );
dbconn = null;
rs = null;
stmt=null;
con = null;
Putting the close() calls in finally block is good, but having them in individual try/catch blocks is better. That way you can still try to close the connection if closing the statement throws an exception.
I don't bother setting them to null. GC is smart enough to know that they've gone out of scope. I don't think it helps.
% -
Difference between list.clear() and new instance
In the below code,
List<String> test = new ArrayList<String)();
list.add("one");
list.add("two");
list.add("three");
list.clear();
(or)
list = new ArrayList<String)();
list.add("four");
list.add("five");
What is the difference between List.clear() and creating new instance for list?1. Use code tags to post codes -- [code]CODE[/code] will display asCODEOr click the CODE button and paste your code between the {code} tags that appear.
2. Invoking clear() sets all the elements of the ArrayList to null and resets the size to 0. public void clear() {
modCount++;
// Let gc do its work
for (int i = 0; i < size; i++)
elementData[i] = null;
size = 0;
}(modCount is used to detect concurrent modification and throw an Exception when needed)
Constructing a new ArrayList creates a new, different, empty ArrayList.
In many situations they might be equivalent, but not in a case where you have two or more variable references to the same ArrayList. Example (watch out for typos)ArrayList<String> stringsA = new ArrayList<String>();
ArrayList<String> stringsB = stringsA;
: // add elements to stringsA
: // stringsB refers to the same populated list
stringsA.clear(); // stringsB refers to the clear()ed list
: // add elements to stringsA again
stringsA = new ArrayList<String>(); // stringsB still refers to the populated listdb -
Difference between site.allowunsafeupdates and web.allowunsafeupdates
What is the difference between web.allowunsafeupdates and site.allowunsafeupdates? I have seen that for some cases both are used and in other cases only web.allowunsafeupdates are used..Please tell me the exact difference ASAP.
Yes.But see i tried this code also..working..
string filePath = string.Empty;
if (SPContext.Current != null && SPContext.Current.Web != null)
SPUser currentUserName = SPContext.Current.Web.CurrentUser;
SPSecurity.RunWithElevatedPrivileges(delegate
using (SPSite spSite = new SPSite(GetRootSiteCollectionUrl()))
// spSite.AllowUnsafeUpdates = true;
using (SPWeb spWeb = spSite.OpenWeb())
spWeb.AllowUnsafeUpdates
= true;
SPFolder list
= spWeb.GetFolder(spWeb.Url + AppConstants.ListUrl.ELC_MASS_USER_UPLOAD);
SPFile document
= list.Files.Add(Guid.NewGuid().ToString() + bulkUserUploadDto.Name, bulkUserUploadDto.DocumentUploadedFileData, true);
SPListItem listItem
= document.Item;
SPFieldUrlValue
fieldUrl = new SPFieldUrlValue
Description = bulkUserUploadDto.WebTitle,
Url = bulkUserUploadDto.WebUrl
listItem[AppConstants.Fields.AddUserToGroup.WEB_URL]
= fieldUrl;
listItem[AppConstants.Fields.TITLE]
= bulkUserUploadDto.Name;
listItem[AppConstants.Fields.AddUserToGroup.IS_REMOVE_EXISTING_USER]
= bulkUserUploadDto.IsRemoveExistingUser;
listItem[AppConstants.Fields.AddUserToGroup.GROUP_TYPE]
= bulkUserUploadDto.DepartmentGroupType;
listItem[AppConstants.Fields.AddUserToGroup.STATUS]
= AppEnums.JobStatus.New;
listItem[AppConstants.Fields.AddUserToGroup.SITE_URL]
= bulkUserUploadDto.WebUrl;
SPUser user =
spWeb.SiteUsers[currentUserName.LoginName];
listItem[AppConstants.Fields.AddUserToGroup.UploadedBy]
= user;
listItem.Update();
filePath = document.Url;
spWeb.AllowUnsafeUpdates
= false;
// spSite.AllowUnsafeUpdates
= false;
return filePath;
Here i didnt use SPcontext and still it works without that.. :(
Ankur garg
Maybe you are looking for
-
Problem with Imported CD -- 5 second issue?
Okay, I'm not sure what this would go under so I'm guessing this part of the forum. I bought a CD of a Broadway musical yesterday and when playing it off the CD in iTunes it works fine. I've noticed that there is no pause between tracks, but the trac
-
Data transfer from oracle database(external database) to sap database
Hi Abapers, I have a requirment like excel data upload from oracle database(external database) to SAP database .Plz any one can help me how to create a bdc program for this requarment. Advance thanks you. Jnana
-
How to see if a R3 system is an ASCII system??
Hi all, I must to do an heterogenoues system copy of an R3 4.6C from: Source System: Windows-Oracle to: Target System: AS400-DB2 I'd like to known if the source system is an ASCII system....how to see it?? I must to see the NLS Parameter in V$paramet
-
TROUBLE MOVING CONTACTS FROM ONE GROUP , , TO OTHER (APPLE ADDRESS BOOK) WHEN I TRY TO DRAG IT WON'T STAY . WHERE SHOULD I BE , AND HOW DO I DRAG ???? AND RELEASE AB
-
im looking at getting a macbook pro but my concern is buying new software. i have software like microsft word that is currently on my dell laptop. i can put that software on up to 3 computers. will work on a macbook pro?