How can I pass a string reference in java?
Hello!My question is how to pass a string reference in java.
I tried to declare my variable, instead of using 'string xxx = 'f';', I used 'string xxx = new String ("f");':
Public Shared Sub main (String [] args)
{
String xxx = new String ("f");
StatusEnum result2 = getErrorPointStr (xxx);
}
public StatusEnum getErrorPointStr (String text)
{
StatusEnum testStatus = StatusEnum.PASS;
StringBuffer buffer = new StringBuffer();
buffer. Append ("123");
text = buffer.toString ();
Return testStatus;
}
After the call to getErrorPointStr (String text) function, xxx = 'f'
If it does not work.
How can I solve this? It is very important, the function will receive String and nothing else.
Thank you!
800512 wrote:
Therefore, there is no way to do it? I mean, the way, as I've just described:To return to StatusEnum and pass by reference String?
This question has already been answered.
It is very important for me to know this.
And already know you, 'cause I told you in the first answer here.
Perhaps if you explain what you're trying to accomplishand why you think that need pass a reference string - in other words, why you think that a reference string is a solution to your problem - in fact we could be able to move forward with help you to solve this problem.
And No, despite what you think, your problem isn't that you 'need to pass a string reference. It's your solution to the real problem of attempted (and failed). So let's get down to that, shall we?
Tags: Java
Similar Questions
-
How can I pass a string to a mxml?
I'm trying to pass a string to the mxml file.
Here is the part of the codes:
var renderPDFForm:RenderPDFForm = new RenderPDFForm();
mx.core.Container.addChild.addChild (renderPDFForm);
The RenderPDFForm is actually a mxml file, I want to do something like when you create the instance, a string can be called.
Given that we cannot create constructor for mxml file, how can I do?
Thank you
I recommend a pair public get/set in the MXML file that you set just after construction. This is roughly equivalent
-
How can I pass a string to oracle
Experts,
can you let me know how can I have paas the string to oracle OBIEE.
I have create a vision OBIE query with a where clause in this query, I spend
AND gr.user_nm = VALUEOF (NQ_SESSION. USER)
for example, in oracle, only it goes like gr.user_nm = userid
and the query fails because it is not bounded by apostrophe (')
It must be placed as AND gr.user_nm = 'user name '.
I tried many ways, but it gives a column not found error...
Thank you
BGHey BG,
I see what you mean.
I have a TEST table in my database contains a single field, TEXT_FIELD VARCHAR2 (20).
I put a TEST presentation variable to 7001-2'.
In the RPD PHYSICAL layer, I create the following view on my table
SELECT TEXT_FIELD
OF THE TEST
WHERE TEXT_FIELD = VALUEOF (NQ_SESSION. TEST)When it executes the SQL code, I get the following in physics
SELECT TEXT_FIELD
OF THE TEST
WHERE TEXT_FIELD = 7001-2There can be no single quotes. So I put single quotes in the physical layer, and I get the following text:
SELECT TEXT_FIELD
OF THE TEST
WHERE = TEXT_FIELD ' VALUEOF (NQ_SESSION. TEST).It is not to evaluate the variable. Oh. I tried a few other variations on the call to session variables (for example the bind syntax: TEST3) but no luck there either.
It seems that at the physical layer, OBIEE will allow you to order how it should interpret the value.
However, if I move this condition to the logic layer. And add in a LOGIC where clause, OBIEE then correctly interpret the type of data and encapsulates the unique value with qoutes.
BG in your BMM layer, are you going to the source of the logic table for GR and put this condition even in there. Then, it should work perfectly.
Good luck and if you found this post useful, please give points.
-Joe
-
in vista how can I pass notpad text to a mail recipient?
I have vista how can I pass on notpad text to a mail recipient? I havn't got 'word' installed.
Thank you.
You can go to file | Except that in Notepad to save the text. You can then use Insert | Attachment to attach the text of a message to the folder (or just drag the file recorded by the message above, then drop it) or you can just copy the text (use follow-up of CTRL-A CTRL-c), then in an e-mail message, and then paste it (CTRL-V).
Steve
-
How can I pass a value to a variable binding in a report query?
I did a query of report to print a PDF report, with a dinamyc source query that has a connection variable, like this:
SELECT EMPNO, EMPNAME, EMPDEPT
FROM EMP
WHERE EMPNO =: PARAMETER;
I want to call the report print directly from a page, by using the url print showed by apex:
f? p = & APP_ID.:0 : & SESSION. : PRINT_REPORT = MYREPORT
How can I pass the value of the variable binding: PARAMETER using this URL?
I don't think you can use the url parameter passes in a report query.
the binding variable: PARAMETER must be a page element or an element of the application.
use the "include session information and application" in the defination of report query to bind the value when the report is run
-
How can I calculate the total time in java?
Hello!
I need to calculate the total time!
For example I start time:
Format formatter1;
Date date1 = new Date();
formatter1 = new SimpleDateFormat("hh:mm:ss");
Dim startTime = formatter1.format (date1);
startTime = "14:20:40.
And I have finishing time:
Format formatter2;
Date2 date = new Date();
formatter2 = new SimpleDateFormat("hh:mm:ss");
String finishTime = formatter2.format (date2);
finishTime = '08:30:55;
Also, having calculated manually, I get the total time: '18:10:15.
How can I calculate the total time in java? (Using formatter1 and formatter2 I guess)
What I need is to print 'total 18:10:15 '.
Thank you!800512 wrote:
I did the following, but I think something's wrong here:I've defined before: Date date1 = new Date(); Date2 date = new Date();
And it should be exactly 5 seconds between them.I found the delta between date1 and date2:
Format formatter = new SimpleDateFormat("HH:mm:ss");
timeInMilliFromStart long = date1.getTime () - date2.getTime ();
Date date3 = new Date (timeInMilliFromStart);
String timeInSecFromStart = formatter.format (date3);and I still get
timeInSecFromStart = 02:00:05But it should be exactly 00:00:05.
What is a problem?
Because, as I said, a Date to measure a moment in time, not a period. So when you have 5000 ms, and you that transform a Date, this means that 5 seconds after the time, which equals 00:00:05.000 01/01/1970 GMT.
As I said, if you are not currently in GMT, then you must set the DateFormat GMT TZ. Right now, it's to show you the time in your TZ. If you have included the date in your SimpleDateFormat, you would see the 01/01/1970 or 31/12/1969, function that TZ you find.
Bottom line: you try to use these classes in a sense they are not intended for, and while you can get the results you want for a limited set of entries if you understand how these classes and how to work with it, it is a fragile approach and comes with all sorts of warnings warning.
-
How can I find out the version of java, oracle has?
How can I find out the version of java, as oracle has built?
I have tried with...
SELECT identifiant_composant, ComputerName, version
OF dba_registry;
"But I get..' table does not exist'."
Thenks in advance!11 GR 2 includes Java version 1.5, according to the above link
HTH
Srini -
How can I determine if a reference is null
If all goes well, there is a simple answer to this question, but I have a vi where I'm passing in references to the input parameters, and I would like to make a comparison to see if they are null. How can I do this?
"Not a path number refnum" will do it.
Ben
-
How can I pass the value of one for two binding settings
Hi all
I have a search query
Select Distinct CONSOLIDATION_SUMMARY_ID, CREATION_DATE CREATED_BY BATCH_ID, PROCESS_FLAG, ERROR_MESSAGE, CUSTOMER_ID, BILLING_FREQUENCY
CONSOLIDATION_LEVEL, SOLD_TO_ORG_ID, SHIP_TO_ORG_ID, TRANSACTIONAL_CURR_CODE, INVOICE_TO_ORG_ID, PRICE_LIST_ID
ORIG_SYS_DOCUMENT_REF, INVENTORY_ITEM_ID, ORGANIZATION_ID, ORDERED_ITEM, ORDERED_QUANTITY, UNIT_LIST_PRICE
UNIT_SEELING_PRICE, ORDER_QUANTITY_UOM, ORDER_NUMBER, ORDER_DATE, INVOICE_NUMBER, INVOICE_DATE
FEE_CALCULATION_WORKSHEET_PDF, TRADE_DETAILS_PDF, INVOICE_REPORT_PDF, PRICING_ATTRIBUTE_CONTEXT
PRICING_ATTRIBUTE, PRICING_ATTR_VALUE_FROM
of xxcurrnx.xxcur_trade_consol_summary XXSTR
WHERE XXSTR. BATCH_ID = NVL (: 1, XXSTR.) BATCH_ID)
and XXSTR. CUSTOMER_ID = nvl (: 2, XXSTR.) CUSTOMER_ID)
But I need to pass only one value to this query: throw the code below
public void passTocusttrxn (String vcustid)
{
System.out.println ("trxn vo customer id:" + vcustid);
XxcurtradeconsummaryVOImpl vOrdnumb = getXxcurtradeconsummaryVO1 ();
vOrdnumb.setWhereClauseParam(0,vcustid);
vOrdnumb.setWhereClauseParam(1,null);
vOrdnumb.executeQuery ();
System.out.println ("the query that is run after is:" + vOrdnumb.getQuery ());
}
But it throws the exception below.
java.sql.SQLException: parameter IN or OUT to missing index: 1
could you please tell me how can I achieve this.
Thank youHello
I hope that the problem solved, pls, close it.
Regads
Meher Irk -
How can I pass parameters of token
Hi all
I wrote this code for the side tab bar
OAStaticStyledTextBean = bulletTextOne
CreateWebBean (OAStaticStyledTextBean) (pageContext, STATIC_STYLED_TEXT_BEAN, null, "textOne");
bulletTextOne.setText (pageContext, yahooText);
bulletTextOne.setCSSClass ("OraLinkText");
bulletTextOne.setDestination (yahooUrl);
bulletList.addIndexedChild (bulletTextOne);
String x="OA.jsp?page=/crm/oracle/apps/xxcrm/crmmgmt/quotationmgmt/webui/xxcrmquotationsearchPG; »
OAStaticStyledTextBean = bulletTextOne
CreateWebBean (OAStaticStyledTextBean) (pageContext, STATIC_STYLED_TEXT_BEAN, null, "textOne");
bulletTextOne.setText (pageContext, yahooText);
bulletTextOne.setCSSClass ("OraLinkText");
bulletTextOne.setDestination (yahooUrl);
bulletTextOne.setDestination (x);
bulletList.addIndexedChild (bulletTextOne);
Here I am navigate from one page to another page when I click on the link
How can she then I pass parameter token at this link
form ${oa.xxcrmCostsheetVO1.OpcsOpportunityid}
Concerning
AnthonyHello
You can enter the Atrribute seen in processrequest like that.
Am = (OAApplicationModule) pageContext.getApplicationModule (webBean) OAApplicationModule;
OAViewObject vo = (OAViewObject) am.findViewObject ("ProjectVO1");
Line OARow = (OARow) vo.first ();
The ID of the string = (String) row.getAttribute("ViewAttribute").toString ();then pass this id as the destination url as said above
Thank you
Gerard -
How can I get the string value displayed on a digital control defined for the relative time.
I have a digital potentiometer to display relative time in increments of 30 minutes.
I want to record the value displayed on the control string. Unfortunately, when I use the "convert to decimal string.vi" number, the resulting string is just the value in seconds.
How can I get the value as a string? (for example 01:30 for an hour and thirty minutes)
Thank you
Sean
Hi Sean.C!
M_Peeker's suggestion is a good thing. A stage that could clarify things is that you must set the % t <%H:%M> format string entry.
< br / > Kristen:.
-
How can I pass data between DIAdem and LabVIEW?
Hello community,
in fact I use a LabVIEW application to control a test system, collect data and store it in a file.
DIAdem is executed (using ITOCommand) and then create a report (PDF).
This works already.
But also, I would like to receive a return value of tiara, a real number, as for example the register R1.
No idea how can be achieved?
Thank you!
Espelkamper
Declare records, variables in the script of tiara that store the calculated result. Read records in labview
-
Hello
I need to install Adobe Acrobat Pro on a new computer laptop. I bought Version 9 in 2009. There is no download option more in my Center of Adobe. How can I do this?
Thank you, Silvia
No upgrade discount still applies. now only Acrobat 10 and 11 are eligible. Or consider subscription instead, strongly recommended because it includes future updates.
-
I can't launch the software, I just buy because it's for Windows. How can I make it so it will work on my Mac?
Info for PC vs Mac: https://forums.adobe.com/thread/1658959?sr=inbox&ru=3738552
-
How can I pass the data to the comment system...
With comments Win XP and linux with samba installed host I get the folder with the command
S:
name of the folder addr\Shred getwayWin 7 does not work with this command...
How can I do?
Thank you very much.
NET use s:
= Send 'Assignment' to 911 for only $999999,99! =
Maybe you are looking for
-
OGG audio plays MIME is ok...
Dear Mozillers, I work on a personal Web site and share my music with success by giving just a direct link to *.ogg files. they were playing. But suddenly they stopped to do so (shortly after 5 - > 6 upgrade), now the player (Firefox a native) waitin
-
How to disable the SMART on Equium L20-197 option?
Hello Does anyone know how disable SMART on a laptop Toshiba L20-197?Only when departures from startup I get an error message on the SMART of a corrupt hard drive detection, too, press f1 to continue, so it's fair enough boots.So I think that I have
-
Satellite A210 - 11 p connected to the TV - the colors are too bright
Just changed to the top of an A60. I used a TV S-signal with one SCART and it worked fine. Now on the new computer, the colors are too bright and washed out. I updated the driver but no luck.In fact, I find the screen on the A210 way too bright and h
-
How can I disable default ContextMenu?
Hello I learned development BlackBerry and am in the middle of writing my first important application. On the main menu of my application (or any extended screen screen, actually) when I click on a part of the screen that does not contain a control,
-
BlackBerry Smartphones Zip files
I have a blackberry "BOLD", how do you download a zip theme?