Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8905993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:32:13+00:00 2026-06-15T02:32:13+00:00

In java : Date d[] = new Date[2]; Date temp[] = {new Date(),new Date()};

  • 0

In java :

Date d[] = new Date[2];
Date temp[] = {new Date(),new Date()};

In Oracle

temp date = (sysdate,sysdate);--it works 

but how to define size of temp as 2 as we do in java code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:32:15+00:00Added an answer on June 15, 2026 at 2:32 am

    I’m not quite sure that I understand the question. You’ve tagged it for PL/SQL so I assume that your “in Oracle” code is intended to be syntactically correct PL/SQL code but what you’ve posted isn’t valid syntax.

    In PL/SQL, you have three different types of collections. You have nested tables, associative arrays, and varrays. You do not declare a size for nested tables or associative arrays at compile time– they will use whatever space they need. You do declare a size for varrays at compile time so you can declare a varray that stores two dates. I can’t envision a case where I would ever want to declare a varray of size 2 rather than using a nested table, though, since you get no benefit from limiting yourself to a 2 element collection. If you want to, though, you can declare the varray as I do below.

    SQL> ed
    Wrote file afiedt.buf
    
      1  declare
      2    -- Nested table
      3    type date_nt is table of date;
      4    -- Associative array
      5    type date_aa is table of date index by pls_integer;
      6    -- VArray
      7    type date_va is varray(2) of date;
      8    l_date_nt date_nt := date_nt( sysdate, sysdate );
      9    l_date_va date_va := date_va( sysdate, sysdate );
     10    l_date_aa date_aa;
     11  begin
     12    l_date_aa(1) := sysdate;
     13    l_date_aa(100) := sysdate;
     14* end;
     15  /
    
    PL/SQL procedure successfully completed.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have very strange behaviour of Java Date class: System.out.println(new Date().toGMTString()); long l =
java.util.Date date = new java.util.Date(); java.sql.Date today = new java.sql.Date(date.getTime()); //2012-03-23 java.sql.Time time =
SimpleDateFormat formatter = new SimpleDateFormat(ddMMyyyy_HHmmSS); String strCurrDate = formatter.format(new java.util.Date()); String strfileNm = Cust_Advice_
SimpleDateFormat formatter = new SimpleDateFormat(ddMMyyyy_HHmmSS); String strCurrDate = formatter.format(new java.util.Date()); String strfileNm = Customer_
import java.util.*; import java.io.*; public String recToString (boolean format) { Date date = new
My program needs to represent this date as a java.sql.date object , but it
I have a Java date object: Date currentDate = new Date(); This will give
Code for QuizSplashActivity : package com.androidbook.triviaquiz; import java.text.DateFormat; import java.util.Date; import android.content.Intent; import android.content.SharedPreferences;
public java.sql.Date getDate() { java.sql.Date date = new java.sql.Date(2001, 10, 10); return date; }
Consider the following where availableExclusions is an array of Date objects. <s:select listValue=(new java.text.SimpleDateFormat('MM/dd/yyyy')).format(new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.