- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
好的,我有这个相机代码我想让它在所有方向上都能发挥作用。在 Android 2.2/2.3.3/3.2 上
我在想类似的事情
if(Build.VERSION.SDK_INT == 8)
do v8 work
else if(Build.VERSION.SDK_INT == 10)
do v10 work
else if(Build.VERSION.SDK_INT == 14)
do v14 work
但我没有任何运气。我尝试的一切都失败了。请帮忙。
Activity .java
package com.ice_os.android.kamura;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import android.hardware.Camera;
import android.hardware.Camera.PictureCallback;
import android.hardware.Camera.ShutterCallback;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.FrameLayout;
public class Activity extends Activity {
private static final String TAG = "Kamura";
Camera camera;
Preview preview;
Button scan;
Button preferences;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
if(camera != null)
{
camera.release();
camera = null;
}
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
scan = (Button) findViewById(R.id.scan);
scan.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
preview.camera.takePicture(shutterCallback, rawCallback,
jpegCallback);
}
});
preferences = (Button)findViewById(R.id.preferences);
preferences.setOnClickListener( new OnClickListener(){
@Override
public void onClick(View v) {
Intent PreferencesIntent = new Intent(AllergyDetektive.this,Preferences.class);
startActivity(PreferencesIntent);
}
});
preview = new Preview(this);
((FrameLayout) findViewById(R.id.preview)).addView(preview);
Log.d(TAG, "onCreate'd");
}
ShutterCallback shutterCallback = new ShutterCallback() {
public void onShutter() {
Log.d(TAG, "onShutter'd");
}
};
/** Handles data for raw picture */
PictureCallback rawCallback = new PictureCallback() {
public void onPictureTaken(byte[] data, Camera camera) {
Log.d(TAG, "onPictureTaken - raw");
}
};
/** Handles data for jpeg picture */
PictureCallback jpegCallback = new PictureCallback() {
public void onPictureTaken(byte[] data, Camera camera) {
FileOutputStream outStream = null;
try {
outStream = new FileOutputStream(String.format(
"/sdcard/%d.jpg", System.currentTimeMillis()));
outStream.write(data);
outStream.close();
Log.d(TAG, "onPictureTaken - wrote bytes: " + data.length);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
}
Log.d(TAG, "onPictureTaken - jpeg");
}
};
// @Override
// public void onPause(){
// super.onPause();
// camera.lock();
// if(camera != null)
// {
// camera.release();
// camera = null;
// }
//
// }
}
预览.java
package com.ice_os.android.kamura;
import java.io.IOException;
import java.lang.reflect.Method;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.hardware.Camera;
import android.hardware.Camera.PreviewCallback;
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
class Preview extends SurfaceView implements SurfaceHolder.Callback {
private static final String TAG = "Preview";
SurfaceHolder mHolder;
public Camera camera;
Preview(Context context) {
super(context);
// Install a SurfaceHolder.Callback so we get notified when the
// underlying surface is created and destroyed.
mHolder = getHolder();
mHolder.addCallback(this);
mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
}
public void surfaceCreated(SurfaceHolder holder) {
// The Surface has been created, acquire the camera and tell it where
// to draw.
camera = Camera.open();
try {
camera.setPreviewDisplay(holder);
camera.setPreviewCallback(new PreviewCallback() {
public void onPreviewFrame(byte[] data, Camera arg1) {
try {
Log.d(TAG, "onPreviewFrame - wrote bytes: "
+ data.length);
}
finally {
}
Preview.this.invalidate();
}
});
} catch (IOException e) {
e.printStackTrace();
}
}
public void surfaceDestroyed(SurfaceHolder holder) {
// Surface will be destroyed when we return, so stop the preview.
// Because the CameraDevice object is not a shared resource, it's very
// important to release it when the activity is paused.
camera.stopPreview();
camera.release();
camera = null;
}
public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
// Now that the size is known, set up the camera parameters and begin
// the preview.
Camera.Parameters parameters = camera.getParameters();
// if (Build.VERSION.SDK_INT >= 8)
// setDisplayOrientation(camera, 0);
// else
// {
// if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT)
// {
// parameters.set("orientation", "portrait");
// parameters.set("rotation", 90);
// }
// if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE)
// {
// parameters.set("orientation", "landscape");
// parameters.set("rotation", 90);
// }
// }
parameters.setPreviewSize(w, h);
parameters.set("orientation","landscape");
parameters.set("rotation", 0);
camera.setParameters(parameters);
camera.startPreview();
}
@Override
public void draw(Canvas canvas) {
super.draw(canvas);
Paint p = new Paint(Color.RED);
Log.d(TAG, "draw");
canvas.drawText("PREVIEW", canvas.getWidth() / 2,
canvas.getHeight() / 2, p);
}
protected void setDisplayOrientation(Camera camera, int angle){
Method downPolymorphic;
try
{
downPolymorphic = camera.getClass().getMethod("setDisplayOrientation", new Class[] { int.class });
if (downPolymorphic != null)
downPolymorphic.invoke(camera, new Object[] { angle });
}
catch (Exception e1)
{
}
}
}
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ice_os.android.allergy_detektive"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera.autofocus"/>
<uses-permission android:name="android.permission.FLASHLIGHT" android:required="false"/>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".Activity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Preferences" >
</activity>
</application>
</manifest>
main.xml
<Button
android:id="@+id/scan"
style="@style/ButtonText"
android:background="@drawable/black_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/preferences"
android:text="klick" />
<Button
android:id="@+id/preferences"
style="@style/ButtonText"
android:background="@drawable/black_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="@string/preferences" />
<FrameLayout
android:id="@+id/preview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/scan" >
</FrameLayout>
日志.txt
02-25 08:33:30.623: D/Kamura(355): onCreate'd
02-25 08:33:32.012: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:32.362: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:32.593: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:32.952: D/dalvikvm(355): GC_FOR_MALLOC freed 930K, 55% free 3027K/6727K, external 1625K/2137K, paused 117ms
02-25 08:33:33.062: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:33.283: D/dalvikvm(355): GC_FOR_MALLOC freed 438K, 56% free 3026K/6727K, external 1625K/2137K, paused 142ms
02-25 08:33:33.413: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:33.693: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 57ms
02-25 08:33:33.703: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:33.922: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 49ms
02-25 08:33:33.932: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:34.152: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 48ms
02-25 08:33:34.162: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:34.393: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 58ms
02-25 08:33:34.413: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:34.633: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 45ms
02-25 08:33:34.653: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:34.864: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 47ms
02-25 08:33:34.882: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:35.112: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 46ms
02-25 08:33:35.132: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:35.344: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 47ms
02-25 08:33:35.363: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:35.603: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 55ms
02-25 08:33:35.623: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:35.842: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 50ms
02-25 08:33:35.862: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:36.092: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 57ms
02-25 08:33:36.112: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:36.323: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 47ms
02-25 08:33:36.343: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:36.573: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 47ms
02-25 08:33:36.593: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:36.802: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 48ms
02-25 08:33:36.822: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:37.052: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 48ms
02-25 08:33:37.073: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:37.293: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 46ms
02-25 08:33:37.303: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:37.533: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 57ms
02-25 08:33:37.553: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:37.763: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 47ms
02-25 08:33:37.782: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:37.992: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 48ms
02-25 08:33:38.012: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:38.253: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 50ms
02-25 08:33:38.274: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:38.504: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 47ms
02-25 08:33:38.523: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:38.733: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 46ms
02-25 08:33:38.753: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:38.972: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 47ms
02-25 08:33:38.982: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:39.213: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 45ms
02-25 08:33:39.223: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:39.453: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 59ms
02-25 08:33:39.473: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:39.693: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 56ms
02-25 08:33:39.713: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:39.922: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 47ms
02-25 08:33:39.942: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:40.162: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 47ms
02-25 08:33:40.172: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:40.403: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 47ms
02-25 08:33:40.433: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:40.653: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 48ms
02-25 08:33:40.663: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:40.892: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 47ms
02-25 08:33:40.902: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:41.132: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 47ms
02-25 08:33:41.153: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:41.364: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 47ms
02-25 08:33:41.383: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:41.623: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 55ms
02-25 08:33:41.643: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:41.862: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 49ms
02-25 08:33:41.882: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:42.113: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 54ms
02-25 08:33:42.152: D/Preview(355): onPreviewFrame - wrote bytes: 447120
02-25 08:33:42.912: D/dalvikvm(355): GC_FOR_MALLOC freed 436K, 56% free 3026K/6727K, external 1625K/2137K, paused 563ms
02-25 08:33:43.393: D/Kamura(355): onCreate'd
02-25 08:33:43.465: D/AndroidRuntime(355): Shutting down VM
02-25 08:33:43.465: W/dalvikvm(355): threadid=1: thread exiting with uncaught exception (group=0x40015560)
02-25 08:33:43.483: E/AndroidRuntime(355): FATAL EXCEPTION: main
02-25 08:33:43.483: E/AndroidRuntime(355): java.lang.RuntimeException: Method called after release()
02-25 08:33:43.483: E/AndroidRuntime(355): at android.hardware.Camera.setHasPreviewCallback(Native Method)
02-25 08:33:43.483: E/AndroidRuntime(355): at android.hardware.Camera.access$600(Camera.java:114)
02-25 08:33:43.483: E/AndroidRuntime(355): at android.hardware.Camera$EventHandler.handleMessage(Camera.java:545)
02-25 08:33:43.483: E/AndroidRuntime(355): at android.os.Handler.dispatchMessage(Handler.java:99)
02-25 08:33:43.483: E/AndroidRuntime(355): at android.os.Looper.loop(Looper.java:123)
02-25 08:33:43.483: E/AndroidRuntime(355): at android.app.ActivityThread.main(ActivityThread.java:3683)
02-25 08:33:43.483: E/AndroidRuntime(355): at java.lang.reflect.Method.invokeNative(Native Method)
02-25 08:33:43.483: E/AndroidRuntime(355): at java.lang.reflect.Method.invoke(Method.java:507)
02-25 08:33:43.483: E/AndroidRuntime(355): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
02-25 08:33:43.483: E/AndroidRuntime(355): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
02-25 08:33:43.483: E/AndroidRuntime(355): at dalvik.system.NativeStart.main(Native Method)
02-25 08:33:46.753: I/Process(355): Sending signal. PID: 355 SIG: 9
最佳答案
仅供理解:相机本身不知道方向,它的CCD芯片牢固地焊接到主板上,相机提供的原始图片原点位于横向放置的手机左上角,x 方向向右,y 方向向下 - 没有什么可以改变这一事实。您可以处理原始图像以更改其方向。
还要记住,当方向改变时,您的 Activity 会被重新创建,并且您必须正确处理相机:
PS:当你的手机进入休眠/锁屏状态时,即使你禁止,启动器也可以强制改变布局方向。
关于java - 如何让android相机在多个方向上工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9407921/
我正在编写一个具有以下签名的 Java 方法。 void Logger(Method method, Object[] args); 如果一个方法(例如 ABC() )调用此方法 Logger,它应该
我是 Java 新手。 我的问题是我的 Java 程序找不到我试图用作的图像文件一个 JButton。 (目前这段代码什么也没做,因为我只是得到了想要的外观第一的)。这是我的主课 代码: packag
好的,今天我在接受采访,我已经编写 Java 代码多年了。采访中说“Java 垃圾收集是一个棘手的问题,我有几个 friend 一直在努力弄清楚。你在这方面做得怎么样?”。她是想骗我吗?还是我的一生都
我的 friend 给了我一个谜语让我解开。它是这样的: There are 100 people. Each one of them, in his turn, does the following
如果我将使用 Java 5 代码的应用程序编译成字节码,生成的 .class 文件是否能够在 Java 1.4 下运行? 如果后者可以工作并且我正在尝试在我的 Java 1.4 应用程序中使用 Jav
有关于why Java doesn't support unsigned types的问题以及一些关于处理无符号类型的问题。我做了一些搜索,似乎 Scala 也不支持无符号数据类型。限制是Java和S
我只是想知道在一个 java 版本中生成的字节码是否可以在其他 java 版本上运行 最佳答案 通常,字节码无需修改即可在 较新 版本的 Java 上运行。它不会在旧版本上运行,除非您使用特殊参数 (
我有一个关于在命令提示符下执行 java 程序的基本问题。 在某些机器上我们需要指定 -cp 。 (类路径)同时执行java程序 (test为java文件名与.class文件存在于同一目录下) jav
我已经阅读 StackOverflow 有一段时间了,现在我才鼓起勇气提出问题。我今年 20 岁,目前在我的家乡(罗马尼亚克卢日-纳波卡)就读 IT 大学。足以介绍:D。 基本上,我有一家提供簿记应用
我有 public JSONObject parseXML(String xml) { JSONObject jsonObject = XML.toJSONObject(xml); r
我已经在 Java 中实现了带有动态类型的简单解释语言。不幸的是我遇到了以下问题。测试时如下代码: def main() { def ks = Map[[1, 2]].keySet()
一直提示输入 1 到 10 的数字 - 结果应将 st、rd、th 和 nd 添加到数字中。编写一个程序,提示用户输入 1 到 10 之间的任意整数,然后以序数形式显示该整数并附加后缀。 public
我有这个 DownloadFile.java 并按预期下载该文件: import java.io.*; import java.net.URL; public class DownloadFile {
我想在 GUI 上添加延迟。我放置了 2 个 for 循环,然后重新绘制了一个标签,但这 2 个 for 循环一个接一个地执行,并且标签被重新绘制到最后一个。 我能做什么? for(int i=0;
我正在对对象 Student 的列表项进行一些测试,但是我更喜欢在 java 类对象中创建硬编码列表,然后从那里提取数据,而不是连接到数据库并在结果集中选择记录。然而,自从我这样做以来已经很长时间了,
我知道对象创建分为三个部分: 声明 实例化 初始化 classA{} classB extends classA{} classA obj = new classB(1,1); 实例化 它必须使用
我有兴趣使用 GPRS 构建车辆跟踪系统。但是,我有一些问题要问以前做过此操作的人: GPRS 是最好的技术吗?人们意识到任何问题吗? 我计划使用 Java/Java EE - 有更好的技术吗? 如果
我可以通过递归方法反转数组,例如:数组={1,2,3,4,5} 数组结果={5,4,3,2,1}但我的结果是相同的数组,我不知道为什么,请帮助我。 public class Recursion { p
有这样的标准方式吗? 包括 Java源代码-测试代码- Ant 或 Maven联合单元持续集成(可能是巡航控制)ClearCase 版本控制工具部署到应用服务器 最后我希望有一个自动构建和集成环境。
我什至不知道这是否可能,我非常怀疑它是否可能,但如果可以,您能告诉我怎么做吗?我只是想知道如何从打印机打印一些文本。 有什么想法吗? 最佳答案 这里有更简单的事情。 import javax.swin
我是一名优秀的程序员,十分优秀!